I have an event on my Starting Animation that does not fire when our Spine prefab is instantiated via code, but does fire later, from a different animation. Curiously, the Starting Animation event fires when the prefab is dragged into the scene during Play Mode, so I believe the hookup is correct.
One thought is that our Spine prefab is an Addressable being instantiated with InstantiateAsync
. Maybe there's a weird interaction there, like Spine's playing the animation before our code can subscribe to the event or something. That would explain why the event doesn't work at first, but does later, and also works with a non-async instantiation like drag and drop.
Anyway, any insight or advice would be great, thanks!