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

[FEATURE] MonoHooks should be able to call instancer-events #396

Open
soraphis opened this issue Apr 25, 2023 · 2 comments
Open

[FEATURE] MonoHooks should be able to call instancer-events #396

soraphis opened this issue Apr 25, 2023 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@soraphis
Copy link
Collaborator

The current implementation of MonoHooks: https://github.com/unity-atoms/unity-atoms/blob/master/Packages/MonoHooks/Runtime/Hooks/VoidHook.cs#L16-L22

Should use VoidBaseEventReference and GameObjectEventReference instead.

Note that an OnAwakeHook would potentially call it's event BEFORE it is created in OnEnable ( https://github.com/unity-atoms/unity-atoms/blob/master/Packages/Core/Runtime/EventInstancers/AtomEventInstancer.cs#L43-L53 )

for that reason, the "inMemoryCopy" should be created on-demand in the Event getter property if it does not exist yet, and the component itself is enabled.

@soraphis soraphis added the enhancement New feature or request label Apr 25, 2023
@soraphis
Copy link
Collaborator Author

since this is a breaking change .... it can't be in the 4.x branch...

@soraphis soraphis added this to the v5.0 milestone Apr 26, 2023
@soraphis
Copy link
Collaborator Author

probably duplicate of #271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant