question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE] Typeless event for AtomBaseVariable

See original GitHub issue

Is 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:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
AdamRambergcommented, May 1, 2020

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 cast AtomBaseVariable to whatever type you are expecting and then access the Changed event? And why do you need to specify the variable as a AtomBaseVariable instead of its specific type, eg. IntVariable?

0reactions
AdamRambergcommented, May 3, 2020

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found