Skip to content

"Value changed" event is called too soon if edited in inspector #86

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
hadmaerd opened this issue Aug 9, 2019 · 1 comment
Closed
Labels
bug Something isn't working
Milestone

Comments

@hadmaerd
Copy link

hadmaerd commented Aug 9, 2019

When you change variable's value in inspector, it triggers Target.Raise() before the value in SO is actually changed, e.g. if you have BoolVariable equal to false and click it in inspector, checkmark appears but listeners still get "false".

To fix it you should put a flag and call the event on next GUI frame that happens immediately anyway.

5a3849cc41256a85f1e6844d753948f2

@hadmaerd hadmaerd changed the title Variable changed event is called too soon if edited in inspector "Variable changed" event is called too soon if edited in inspector Aug 9, 2019
@hadmaerd hadmaerd changed the title "Variable changed" event is called too soon if edited in inspector "Value changed" event is called too soon if edited in inspector Aug 9, 2019
@DanielEverland DanielEverland added the bug Something isn't working label Aug 17, 2019
@DanielEverland DanielEverland added this to the Untitled Release milestone Aug 17, 2019
@DanielEverland
Copy link
Owner

Fixed. Thanks for reporting the issue :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants