Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Editor Sync: Messing with UnityEvents #180

Closed
6 tasks done
krisrok opened this issue Sep 14, 2023 · 1 comment
Closed
6 tasks done

Editor Sync: Messing with UnityEvents #180

krisrok opened this issue Sep 14, 2023 · 1 comment
Labels
fixed β†’ to verify but needs testing

Comments

@krisrok
Copy link
Contributor

krisrok commented Sep 14, 2023

Describe the bug πŸ’¬

Deserialization breaks when the event list is changed via inspector while ES is active.
As the ES changes persist, the session has to be killed by restarting vite.

Operating System πŸ‘©β€πŸ’»

Windows

What browsers are you seeing the problem on? πŸ„β€β™‚οΈ

Chrome

Editor Version 🎲

2021.3

Needle Exporter version

3.14.0-pre

Project Info (Unity only) πŸ“œ

No response

Steps to reproduce πŸ”’

1) Export and start the scene with ES
2) The grid should blink on and off (triggered by _boolEvent), the Cube should move (triggered by _nonGenericEvent).
3) Modify one of the events via inspector (e.g. by clicking on the +)
4) Watch the triggers not working anymore (grid should stop blinking or Cube moving, depending on which event was modified)
5) Reload page => Triggers not working anymore
6) Restart vite and reload page => Triggers working until events get modified again

Reproduction β™»

Uploaded as Bugreport-Minimal 1-230913-115251_uw.zip

Discord or Discussion link

No response

Validations 🩹

@krisrok krisrok added the untriaged Newly reported issue label Sep 14, 2023
@marwie
Copy link
Member

marwie commented Sep 15, 2023

Hi, thanks for the report.

The next version (> 3.16.2) will ignore UnityEvent modifications for now and add an EditorModificationHandler.HandleChange event which can be used to ignore certain modifications (the arguments have the target object, propertyname and value as well as a bool for preventDefault. Setting this to true will ignore the change).

This event also allows to modify the target and object data if necessary

@marwie marwie added fixed β†’ to verify but needs testing and removed untriaged Newly reported issue labels Sep 15, 2023
@marwie marwie closed this as completed Dec 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed β†’ to verify but needs testing
Projects
None yet
Development

No branches or pull requests

2 participants