Av3Emulator
Av3Emulator copied to clipboard
Add a hook to run transformations prior to runtime initialization
When writing editor scripts for avatars that run via build hooks, it can be helpful to have them work when the Av3Emulator is running as well. However, currently the Av3Runtime reads a bunch of data from the avatar descriptor in Awake, and there's not a reliable way for external tools to run prior to this point (without modifying the scene permanently).
This change adds a hook which can be used to inject a hook to run prior to Av3Runtime startup to resolve this issue.
Good idea. I realize it's hard to add in other customizations without this. For now av3 emu can be manually patched but this should go into the next update.
The reason I run aggressively in awake is I want to make sure the animator initialization order is correct with respect to other components on the avatar, such as other animators or physbone components.
@lyuma this PR has been sitting around for a while - one thought I had in the meantime was whether it might be better to just run the normal VRCSDK preprocessing hooks. This gives a bit less control (in that you can't opt-out from av3emu processing only) but (more-or-less) accurately reflects what the SDK would do. What are your thoughts?
Closing in favor of #63