Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question What are the conditions where Animator.Initialize() is called?

Discussion in 'Animation' started by davenirline, Apr 25, 2023.

  1. davenirline


    Jul 7, 2010
    This method is heavy and we don't have control on when is it called. We already made a special pool where objects with Animator are not deactivated. We just move them to a far away location. This is so that Animator.Initialize() will not be invoked on reactivation. But even with this, Animator.Initialize() is still being invoked when an instance is requested and put to its correct position. I tried removing setting of parent but it still doesn't work. So I want to know what are the conditions when Animator.Initialize() is called. It can't be just setting the position because normal activated instances that are moved by gameplay don't call this method.