Commit Graph

47 Commits

Author SHA1 Message Date
Mehmet Hazar Artuner
5a0a29f015
Add workaround for "Enter Play Mode" feature to enable initial values (#182)
* Add workaround for Unity's "Enter Play Mode" feature to enable initial values

* exclude UnityEditor from build

* use HashSet to store AtomVariable instances
2020-09-06 11:36:24 +02:00
Gustavo Guimaraes
cd8cd63ec0
Default Value For Changed and ChangedWithHistory (#179)
* Changed now is created even if null

* Added changedwithhistory

* Removed initial implementation
2020-08-04 00:55:26 +02:00
Adam Ramberg
634b42adcf
#131 - Added forceEvent parameter for SetValue function on AtomVariable (#157) 2020-05-12 17:56:01 +02:00
Oliver Biwer
4a802d0c27
Changes in GetEvent implementation to allow inheritance (#140) 2020-05-03 07:45:08 +02:00
Ignacio Ruiz
3666304b55
Added inspector toggle for triggering Changed and ChangedWithHistory on OnEnable (#126)
* Booleans to decide if OnChanged Events are triggered on Variable's OnEnable were added

* Variable's editor was updated to show both booleans

* Docs updated with new variables

* Changelog update

* Change variable visibility to private and add explicit default value

Co-authored-by: Ignacio Ruiz <iruizm@hiberus.com>
2020-04-26 19:57:55 +02:00
Enderlook
5a2816e3ae
Fix typos (#120) 2020-03-30 17:07:10 +02:00
Adam Ramberg
24831f5927 Docs added 2020-03-21 21:48:05 +01:00
Adam Ramberg
698c18dbe7 Fix Variable with class type issues 2020-03-20 00:48:23 +01:00
Adam Ramberg
a90a336980 Finished example scene 2020-03-18 02:00:18 +01:00
Adam Ramberg
74bfaf7086 Example WIP + Variable ID 2020-03-18 00:17:33 +01:00
Adam Ramberg
c71fe4fa60 Tweak 2020-03-16 00:18:26 +01:00
Adam Ramberg
90079f5873 Fix atomstag bug 2020-03-15 23:18:29 +01:00
Adam Ramberg
e4c489c88e WIP 2020-03-11 21:11:27 +01:00
Adam Ramberg
42d97b840f More WIP 2020-03-09 23:51:14 +01:00
Adam Ramberg
dbe95e97d1 WIP 2020-03-08 20:41:22 +01:00
Adam Ramberg
769388c6e4 FSM pkg + Example WIP 2020-03-08 12:32:41 +01:00
Adam Ramberg
06d89697f3 Example WIP 2020-03-05 00:48:39 +01:00
Adam Ramberg
44c2413c56 Fix intro scene 2020-03-02 19:36:52 +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
81e35f17fe
Add util actions to Variables (#115) 2020-02-23 23:07:49 +01:00
Adam Ramberg
0a1fea485d
Fix variable equality issues (#111) 2020-02-23 02:22:39 +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
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
AdamRamberg
40e1af7ffe Expose get property InitialValue for Variables 2019-10-20 23:21:16 +02:00
AdamRamberg
cd90f0e667 Remove all FormerlySerializedAs attributes 2019-10-18 17:36:10 +02:00
AdamRamberg
47265591e6 Generate more docs for scene mgmt 2019-10-15 23:31:21 +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
52dc7f8299 Remove unused interfaces 2019-10-15 02:16:11 +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
46af4f9f3a Fix warnings when importing package 2019-10-03 21:34:57 +02:00
AdamRamberg
0646ef5594 Update the last missing atoms with new icon system 2019-10-02 17:49:38 +02:00
AdamRamberg
235728fdf4 Regenerate core atoms with new icon system 2019-10-02 17:36:20 +02:00
AdamRamberg
416426f026 New repo structure 2019-10-01 17:27:22 +02:00