[FEATURE] Typeless event for AtomBaseVariable
See original GitHub issueIs your feature request related to a problem? Please describe.
We can have AtomBaseVariable as a serialized field, but there is no way to access its Changed
event.
Since all AtomBaseVariables have Values and that value can change, it is possible to have a typeless Changed event.
Describe the solution you’d like
To have TypelessChanged
event in AtomBaseVariable
.
Describe alternatives you’ve considered The only alternative is to manually track changes of AtomBaseVariable value every frame in script that uses it.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t think we want to add a typeless event to
AtomBaseVariable
, since it is used as a base class for constants as well. Why not just castAtomBaseVariable
to whatever type you are expecting and then access theChanged
event? And why do you need to specify the variable as aAtomBaseVariable
instead of its specific type, eg.IntVariable
?@soraphis suggestion combined with #140 should solve your case (#140 will be included in v4.2 of Unity Atoms). Closing this issue. If this solution is not sufficient please reopen this issue.