Av3Emulator icon indicating copy to clipboard operation
Av3Emulator copied to clipboard

Add a hook to run transformations prior to runtime initialization

Open bdunderscore opened this issue 3 years ago • 1 comments

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.

bdunderscore avatar Jul 25 '22 00:07 bdunderscore

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 avatar Jul 26 '22 05:07 lyuma

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

bdunderscore avatar Sep 10 '22 01:09 bdunderscore

Closing in favor of #63

bdunderscore avatar Sep 10 '22 16:09 bdunderscore