Commit Graph

244 Commits

Author SHA1 Message Date
Adam Ramberg
c3bc59259f More WIP 2020-03-02 02:26:06 +01:00
Adam Ramberg
5d9f8dca71 WIP 2020-03-01 21:32:52 +01:00
Adam Ramberg
3613e32c34 v3.0.0 🐉 2020-02-24 00:59:35 +01:00
Adam Ramberg
85f72abf8a Add AddComponentMenu to Variable Instancers 2020-02-23 23:13:30 +01:00
Adam Ramberg
81e35f17fe
Add util actions to Variables (#115) 2020-02-23 23:07:49 +01:00
Adam Ramberg
6309943385
Replay subject (#114)
* Add constructor with value to Reference classes

* Implemented ReplayBehaviour for AtomEvents
2020-02-23 21:44:04 +01:00
Adam Ramberg
7c4f92ecd8
Add constructor with value to Reference classes (#113) 2020-02-23 03:17:05 +01:00
Adam Ramberg
d045434eff Fix ValueEquals in AtomVariable template 2020-02-23 02:49:58 +01:00
Adam Ramberg
8a6b8a97a6
Added Variable Instancer, Event Reference, Atom Collection and Atom List (old Atom List renamed to Atom Value List) (#110)
AtomVariableInstancer
- Added AtomVariableInstancer as an option to AtomReference.
- Added AtomVariableInstancer to generator.
- Added editor icon for AtomVariableInstancer.

AtomEventReference
- Added an AtomEventReference class (and AtomEventX2Reference). It’s similar to an AtomReference, but for Events. Let’s you pick between an Event, Variable (will select the Changed event) and a VariableInstancer (see above).
- Added AtomEventReference and AtomEventX2Reference to generator.
- Added a drawer for AtomEventReference.
- Listeners are now using AtomEventReference instead of AtomEvent.
- Refactoring of VoidHooks since Listeners are now using AtomEventReference.

AtomCollection
- Created an AtomCollection - a collection of Atoms associated with key strings (AtomReferences).
- Added new editor icon for collections.
- Created a SerializableDictionary class, which AtomCollection is using.
- Custom property drawer for SerializableDictionary.
- SerializableDictionary supports nested structures meaning that a AtomCollection can have a KVP that is pointing to another AtomCollection.
- AtomCollections have 3 events: Added, Removed, Cleared.
- Added an option to sync an InstanceVariable to collection - adding it to the collection when created (using gameObject’s instance id as key) and removing it from the collection when destroyed.

AtomList
- Renamed old AtomList to AtomValueList
- Added AtomList, like Collection, but a list
- Added new icon for AtomList
- Created a AtomBaseVariableList class, which AtomList is using.
- Custom property drawer for AtomBaseVariableList.
- AtomLists have 3 events: Added, Removed, Cleared.
- Added an option to sync an InstanceVariable to list - adding it to the list when created and removing it from the list when destroyed.
2020-02-23 02:39:43 +01:00
Adam Ramberg
0a1fea485d
Fix variable equality issues (#111) 2020-02-23 02:22:39 +01:00
Low Jiahao
9a9b72f052
Reactivate Generator function in Unity 2018.4. (#106)
Co-authored-by: Adam Ramberg <adam@mambojambostudios.com>
2020-02-19 01:25:30 +01:00
Adam Ramberg
ed856beb11
Fix indentation bug in variable drawer (#109) 2020-02-18 22:20:29 +01:00
Adam Ramberg
630d45bceb
IsUnityAtomsRepo should never be settable (#108) 2020-02-16 21:10:45 +01:00
Adam Ramberg
9b027e2308
Added pre change transformers to Variables + Clamp Int / Float (#93)
* Added pre change transformers to Variable + Clamp Value Function (first pre change transformer implementation)
- Added a list of pre change transformers to AtomVariable
- Added docs
- Added two AtomFunctions - ClampInt and ClampFloat
- Added custom editors for ClampInt and ClampFloat
- AtomFunction<T, T> is not part of the generator
- Regenerated all the Atoms

* - Created a base class for the editor for ClampFloat and ClampInt. Apparently it is not allowed to have multiple CustomEditor attributes defined for the same class. To implement this I also created an interface called `IIsValid` (for casting purposes in the editor).
- Initialize `PreChangeTransformers ` at declaration and removed initialization `OnEnable`
- Moved call to `RunPreChangeTransformers ` from `OnEnable` to `OnValidate`. Running it 2 times, once for initialValue and once for value since value can be changed at runtime via editor.
- Made the variable PreChangeTransformers private and created a property instead in order to make it impossible to overwrite the list with `null` from the outside.
- Moved `ClampInt` and `ClampFloat` in the `CreateAssetMenu` for `Unity Atoms/Functions/Transformers`
2020-02-16 12:44:46 +01:00
Oliver Biwer
1772b75ec5
Update AtomVariable.cs 2020-02-10 15:25:07 +01:00
Adam Ramberg
90a505bbd3 v2.1.1 🤖 2020-01-23 23:42:09 +01:00
Lucas Ribeiro
82e78f51d3 Fix Remove Tag from AtomTags and Fix Remove Tag Test (#102) 2020-01-23 21:09:27 +01:00
Low Jiahao
d619146076 Unity v2018.4 Support (#98)
* - Fixed MonoHooks asmdef reference to Core asmdef was broken.
- Fixed dependancy issue for Package Manager.
- Removed Generator function in version 2018.4.

* Updated to include 2018.4 define directive.
2020-01-23 20:01:31 +01:00
AdamRamberg
b51de335e0 v2.1.0 🚀 2019-11-28 19:35:59 +01:00
IceTrooper
be6a479bc1 #84 parameterless atom listener (#86)
* added base class for AtomAction; modified VoidAction; added Register/UnregisterListener to non-generic AtomEvent; added parameterless AtomListener; small polishing

* removed EditorIcon from AtomAction; fixed misspelled word in AtomEvent
2019-11-26 20:12:54 +01:00
Adam Ramberg
cc63d654b3
Name OnTriggerHook class properly. (#91)
* Bux fix - name OnTriggerHook class properly.

* Add entry to CHANGELOG
2019-11-15 06:33:23 +01:00
Oliver Biwer
a5641f6514 Variable and Constant Drawers show a preview value (#89)
* Drawers of Variables and Constants show value field

* #89 Adjust preview width for Vector2 and Vector3
2019-11-14 22:46:58 +01:00
Oliver Biwer
1dd2baeaec Better user guidance for working with AtomVariables (#70)
* #69 added custom editor for Variable Types, to guide the usage flow and reduce errors.

* allows unlocking of initialvalue in playmode

* adjustments to Variable Inspector

* Generator now works with all kinds of setups. just select the Packages folder when calling RegenerateAll.
Used this to regenerate the CustomEditors

* supports now structs

* Added RaiseButtons in VariableEditor. #72
Adding simple logging helper on listeners, for fast debugging.

* Call `serializedObject.Update();` before `OnInspectorGUI` in the editor script in order to update old value when changing value.
Show children for PropertyFields for initial and old value.
Some minor refactoring - renaming variables
Clean up in `RegenereateAllAtoms`
Use `OnEnable` instead of `OnAfterDeserialize` when setting inital value for variable. `OnAfterDeserialize` was causing major issues with the custom editor, eg. it did run when focusing a Variable and showing the inspector, basically making it worthless to change or even inspect the Variable at runtime. `OnEnable` is only called ones when the ScriptableObject is loaded in runtime, which is what we really want. This has been tested running in the editor and in builds.
Add missing editors scripts `TouchUserInputVariableEditor`and `SceneFieldVariableEditor`
2019-11-14 12:59:11 +01:00
Oliver Biwer
1c8964e30f
Merge pull request #88 from IceTrooper/#87-fixed-bug-with-multiline-constant-value-in-atomreference
Fix #87: AtomReference Drawer is always 1 line, even if the object needs more
2019-11-13 22:16:56 +01:00
IceTrooper
23a8873462 Changed AddComponentMenu names for Listeners/Hooks (#84)
* changed AddComponentMenu names for Listeners

* renamed AddComponentMenu Listeners names in other packages

* renamed AddComponentMenu for hooks

* renamed double Listeners to "x 2" convention
2019-11-13 08:59:39 +01:00
Ice_trooper
789c39d39c #87 bug fixed 2019-11-12 00:03:12 +01:00
Oliver Biwer
c4a84838b4
Update AtomReference.cs
small change to be more future-proof.
 - when the Usage-Enum is extended this will not silently do nothing
2019-11-11 21:01:10 +01:00
Ignacio Ruiz
3047512a62 Setter to AtomReference's Value was added in order to set the value depending on _usage 2019-11-09 23:08:40 +01:00
AdamRamberg
babb691792 V2.0.0 🎉 2019-10-24 08:15:45 +02:00
AdamRamberg
b8c3dc668f #68 - render default drawer when multi editing 2019-10-22 22:11:21 +02:00
AdamRamberg
9cb9a0de20 #68 Temporarily dissalow multiobject editing 2019-10-22 08:03:14 +02:00
AdamRamberg
40e1af7ffe Expose get property InitialValue for Variables 2019-10-20 23:21:16 +02:00
AdamRamberg
0ad40a67d4 #65 - Fix indent and ui state issues of drawer 2019-10-20 21:48:52 +02:00
AdamRamberg
a496c19bf7 Set default values to remove MH warnings 2019-10-20 21:16:07 +02:00
AdamRamberg
551aee6acc Add missing MonoHooks folder meta 2019-10-20 15:06:08 +02:00
AdamRamberg
cd90f0e667 Remove all FormerlySerializedAs attributes 2019-10-18 17:36:10 +02:00
AdamRamberg
d5e7303483 UATags -> AtomTags 2019-10-17 12:57:00 +02:00
AdamRamberg
cdbdce7329 #41 - Create BaseAtomListener including dev desc 2019-10-16 19:43:05 +02:00
AdamRamberg
14f02a998e #54 - temp workaround for Unity serialization bug 2019-10-16 18:14:25 +02:00
AdamRamberg
299dc195e2 - Added a top menu bar option to regenerate all existing Atoms. Nifty when developing the library.
- Added the option to use a Constant in Atom References. Related to #58
2019-10-16 18:02:08 +02:00
AdamRamberg
bfc37e2a2f Readd MonoHooks as a subpackage 2019-10-16 01:43:51 +02:00
AdamRamberg
47265591e6 Generate more docs for scene mgmt 2019-10-15 23:31:21 +02:00
AdamRamberg
afcb782fd6 Various docs fixes 2019-10-15 23:20:05 +02:00
AdamRamberg
867d360ebf Regenerate docs for SceneField Atoms 2019-10-15 22:39:20 +02:00
AdamRamberg
14931be3e6 Regenerate docs for Void Atoms 2019-10-15 22:37:15 +02:00
AdamRamberg
b5f4753a12 Regenerate docs for Vector3 Atoms 2019-10-15 22:34:48 +02:00
AdamRamberg
c82730e598 Regenreate docs for Vector2 Atoms 2019-10-15 22:34:08 +02:00
AdamRamberg
f100e80929 Regenerate docs for string Atoms 2019-10-15 22:33:06 +02:00
AdamRamberg
aea55bbbc6 Regenerate docs for int Atoms 2019-10-15 22:32:06 +02:00
AdamRamberg
f64145039b Regenerate docs for GameObject Atoms 2019-10-15 22:30:18 +02:00
AdamRamberg
7c12660c78 Regenerate docs for float Atoms 2019-10-15 22:29:05 +02:00
AdamRamberg
57734a1a3a Regenerate docs for Collider2D Atoms 2019-10-15 22:27:22 +02:00
AdamRamberg
aa8c1f4d3e Regenerate docs for Collider Atoms 2019-10-15 22:26:14 +02:00
AdamRamberg
2c30f5959e Regenerate docs for Color Atoms 2019-10-15 22:24:44 +02:00
AdamRamberg
d2470de405 Regenerate docs for bool Atoms 2019-10-15 22:23:46 +02:00
AdamRamberg
8163b8c1d6 Generate docs for Atom Variable 2019-10-15 22:21:56 +02:00
AdamRamberg
1d880e1116 Remove interfaces not used 2019-10-15 22:12:37 +02:00
AdamRamberg
0b17069e97 Update Unity Events template comments 2019-10-15 22:03:54 +02:00
AdamRamberg
ed716bc509 Docs WIP 2019-10-15 22:02:44 +02:00
AdamRamberg
ecf63d1580 Add docs to Atom List 2019-10-15 21:39:32 +02:00
AdamRamberg
cf23583293 Document Atom Listener 2019-10-15 21:21:23 +02:00
AdamRamberg
8c2b72e9c0 Regenerate TouchUserInput Atoms 2019-10-15 21:10:57 +02:00
AdamRamberg
6a2212bfc2 Use compiler flag UNITY_2019_1_OR_NEWER - docs gen 2019-10-15 21:08:49 +02:00
AdamRamberg
3ce79d3f9b Document Core WIP 2019-10-15 20:44:25 +02:00
AdamRamberg
1c7eecb985 Create documentation WIP 2019-10-15 19:19:44 +02:00
AdamRamberg
13ab7b6fc3 Docs for mobile api 2019-10-15 03:07:22 +02:00
AdamRamberg
52dc7f8299 Remove unused interfaces 2019-10-15 02:16:11 +02:00
AdamRamberg
28ef77fdc4 Correct namespace 2019-10-15 02:09:15 +02:00
AdamRamberg
3a46454ddb Generate docs - document tags 2019-10-15 02:08:41 +02:00
AdamRamberg
9ef5f06f9e Bug fix 2019-10-14 17:17:06 +02:00
AdamRamberg
9822202acd UseIcon -> EditorIcon 2019-10-14 16:51:54 +02:00
AdamRamberg
ac53d4e7a4 ResetValue -> Reset 2019-10-14 16:39:22 +02:00
AdamRamberg
0cc2e21023 Rename Listener GameEvent -> Event 2019-10-14 16:37:24 +02:00
AdamRamberg
0f88039fef Fix assembly references 2019-10-13 22:47:22 +02:00
AdamRamberg
0b683448fb Added eslint + prettier and updated .editorconfig 2019-10-07 20:47:30 +02:00
AdamRamberg
269df1bec3 Add website for documentation 2019-10-04 01:37:30 +02:00
AdamRamberg
327dd87222 Use NPM instead of Github registry 2019-10-03 22:00:36 +02:00
AdamRamberg
46af4f9f3a Fix warnings when importing package 2019-10-03 21:34:57 +02:00
AdamRamberg
3a76b53d3c Add missing meta + adjust package.json 2019-10-03 17:51:16 +02:00
AdamRamberg
dc37bd33de Add files meta in package.jsons 2019-10-03 17:40:26 +02:00
AdamRamberg
3431832f6c Add publish scripts to Github registry 2019-10-03 17:23:09 +02:00
AdamRamberg
0646ef5594 Update the last missing atoms with new icon system 2019-10-02 17:49:38 +02:00
AdamRamberg
b88e90ca47 Update SceneField with new icon system 2019-10-02 17:49:06 +02:00
AdamRamberg
5f78b73055 Update TouchUserInput icons 2019-10-02 17:38:13 +02:00
AdamRamberg
235728fdf4 Regenerate core atoms with new icon system 2019-10-02 17:36:20 +02:00
AdamRamberg
fbf153f2c6 New simpler / better icon system 2019-10-02 17:21:27 +02:00
AdamRamberg
4fe9d91205 AtomicTags -> UnityAtomsTags 2019-10-01 23:50:28 +02:00
AdamRamberg
e80a082c6d Generate new SceneField atoms 2019-10-01 23:45:42 +02:00
AdamRamberg
7683acb9bb Add sub unity atoms namespace to generator + generate new atoms for TouchUserInput 2019-10-01 23:26:25 +02:00
AdamRamberg
79f80723a2 Generator now handles namespaces 2019-10-01 22:27:16 +02:00
AdamRamberg
e9d119d8ac Fix empty line issue for conditionals in generator 2019-10-01 21:02:23 +02:00
AdamRamberg
416426f026 New repo structure 2019-10-01 17:27:22 +02:00
Adam Ramberg
bdf81a5e9c Squashed commit of the following:
commit 847eff037204d841546c0da772d2f341f9cf1e25
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Sun Mar 17 22:09:38 2019 +0100

    #17 - Serializable not needed for ScriptableObject

commit 593b275e6394b9d589de8a7a20375145dfc4aa84
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Sun Mar 17 21:59:33 2019 +0100

    18 - IGameEvent<T1, T2> RegisterListener

commit 40443ce9bd4b1c339aaf19cfcb119f2336608dae
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 16:35:04 2019 +0100

    Remove some more warnings

commit bd453110ac51a6ebe3d54368fcb039bdbe52e278
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 16:33:30 2019 +0100

    Update README

commit 90977b853a047c84efb5311768a09f4e8a1165b2
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 16:31:45 2019 +0100

    Initialize to null to get rid off warnings

commit 38b7f5c4ede195aa7198f567801c9cbeedc9b6f6
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 16:15:53 2019 +0100

    More fixes to enable local unity project

commit 404e1cbf88ed4431c61d3ece074e838e74ac5141
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 16:12:37 2019 +0100

    Remove duplicated asmdef

commit 5734300684e8a16553f213157cad1b4722b7cb7f
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 16:09:46 2019 +0100

    Change files to include

commit d1e42b119a6bc1577b1792459fa298e063652337
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 16:05:56 2019 +0100

    Added root package json

commit 1709a0347147d74460f653182bbaf8d15eb6154e
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 15:30:44 2019 +0100

    #16 - Add test and examples Unity project

commit a3ea1a133bf6727e011ba85c64569db45302e487
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 13:12:02 2019 +0100

    #13 - Make usage of UPM (package manager)

commit 492a30e905f6cf3f5899cb7080ef2bda73110f00
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 11:28:56 2019 +0100

    Added extensions + code formatting fixes

commit 709949a1016c236cfd363cf25392fedfd8d083ca
Author: Oliver Biwer <soraphis@users.noreply.github.com>
Date:   Fri Mar 8 10:16:45 2019 +0100

    More AtomicTags changes (#15)

    * - added assembly defintions, and unit tests
    - improved AtomicTags in regards of #8, #9 and #10

    * Fixes #11
    - Added Equality Members (inclusive HashCode) for ScriptableObjectVariableBase

    * removed Rider Plugins from git

    * Further AtomicTag optimization

commit ae6584c879f182e727fe0a8d0aff4b0715829914
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 10:08:36 2019 +0100

    Editor config

commit 197d7067608600e4e2d13dc42db909ee8f8c75df
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 09:23:12 2019 +0100

    Added editor config file

commit 53d6adc07b
Author: Oliver Biwer <soraphis@users.noreply.github.com>
Date:   Tue Mar 5 22:57:47 2019 +0100

    More efficient AtomicTags (#12)

    * - added assembly defintions, and unit tests
    - improved AtomicTags in regards of #8, #9 and #10

    * Fixes #11
    - Added Equality Members (inclusive HashCode) for ScriptableObjectVariableBase

    * removed Rider Plugins from git

commit 81209d83b5
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Wed Dec 12 20:54:17 2018 +0100

    Added MonoHooks + ColliderType + bug fixes

commit c6b240cebb
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Sat Dec 1 00:23:10 2018 +0100

    Experimenting with adding UI state management

commit dfd70a8944
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Nov 30 23:10:21 2018 +0100

    Issue #6 - AtomicTags

commit 8907763227
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Nov 30 22:42:29 2018 +0100

    First commit of v1.0.0
2019-03-17 23:43:20 +01:00
Adam Ramberg
63b4bf99e7 First commit 2018-10-30 20:05:06 +01:00