Animator is not initialised
Hello there!
I have a couple of animators that hitch a ride on a do not destroy on load game object through a few scenes. Unfortunately, when we come back to the scene where they are supposed to turn on again and do their thing I get the warning "Animator Not Initialised" resulting in weird behavior, such as menus not showing up, grayed up text, etc.
Any idea what's at fault and how best could it be resolved?
Yeap, they work perfectly. They work even after the switch but not very well. As in they still do the movements they are supposed to but the animations look odd.
Have you tried this? Animator.isInitialized and Animator.Rebind?
Try something like that:
void OnLevelWasLoaded(int level)
{
if (!animator.isInitialized)
animator.Rebind();
}
$$anonymous$$akes no difference unfortunately.
Answer by Charkomangus · May 09, 2016 at 11:51 AM
Fixed it! In the end just had to add an update call that said:
Set the current menu to open.
While a workaround to the fact that the animators don't properly initialise I haven't seen side-effects yet.