Commit Graph

335 Commits

Author SHA1 Message Date
Adam Ramberg
f8a73c143f Set default to avoid compiler warnings 2020-03-02 20:27:38 +01:00
Adam Ramberg
254352f4a2 Add missing meta file for BaseAtoms 2020-03-02 20:22:19 +01:00
Adam Ramberg
f87d3e4646 Add blog posts to README 2020-03-02 20:17:45 +01:00
Adam Ramberg
818c0a259e Align docs 2020-03-02 20:12:38 +01:00
Adam Ramberg
b4b8ad0c09 Remove white spaces in Variable Instancers 2020-03-02 19:57:51 +01:00
Adam Ramberg
25cca2c9fe Use Event Reference in MonoHooks 2020-03-02 19:52:08 +01:00
Adam Ramberg
15dd11a6f9 Fix example scenes 2020-03-02 19:40:34 +01:00
Adam Ramberg
44c2413c56 Fix intro scene 2020-03-02 19:36:52 +01:00
Adam Ramberg
6f78cab386 Update docs + remove ds store 2020-03-02 18:42:19 +01:00
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
beb740503c Update Example project to 2019.3.1f1 2020-02-23 02:55:04 +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
0916c0ae96 Fix screenshots method naming mistake 2020-01-28 23:26:53 +01:00
Adam Ramberg
90a505bbd3 v2.1.1 🤖 2020-01-23 23:42:09 +01:00
Adam Ramberg
af6cd06fb7 Update example project to Unity 2019.2.17f1 2020-01-23 22:25:20 +01:00
Lucas Ribeiro
82e78f51d3 Fix Remove Tag from AtomTags and Fix Remove Tag Test (#102) 2020-01-23 21:09:27 +01:00
Favo Yang
a3db8f13e9 docs: add installation options and badges for OpenUPM (#100)
* docs: add installation options and badges

* Minor adjustments to headers in README + added installation instructions of OpenUPM to website

Co-authored-by: Adam Ramberg <adam@mambojambostudios.com>
2020-01-23 20:48:42 +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
AdamRamberg
e0fa81badd New feature -> New features 2019-11-15 06:36:35 +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
AdamRamberg
6c70a40961 Add items to the CHANGELOG 2019-11-14 22:57:22 +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
AdamRamberg
acf901eb6d Merge branch 'canary' 2019-11-11 23:31:41 +01:00
AdamRamberg
e7fe472717 Updated CHANGELOG.md 2019-11-11 22:33:55 +01:00
Oliver Biwer
e2faf2e3d6
Merge pull request #78 from Saso222/canary
Setter to AtomReference's Value was added
2019-11-11 21:02:43 +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
Adam Ramberg
a35847eae3
Merge pull request #73 from AdamRamberg/add-discord-link-to-docs
Add discord link to docs
2019-11-11 08:04:44 +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
69a698bd66 #59 - Add discord link to docs 2019-11-03 17:50:45 +01:00
AdamRamberg
a45918ee43 Small adjustment to PUBLISHING.md 2019-10-24 08:31:52 +02:00
AdamRamberg
11b870a2b1 Merge branch 'master' of https://github.com/AdamRamberg/unity-atoms 2019-10-24 08:23:09 +02:00