Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

After SetGenericBinding(Animator) and remove them, the Animator become uninitialized for a while.

Discussion in 'Timeline' started by canis, Feb 2, 2021.

  1. canis


    Oct 25, 2013
    As title, I was playing around the timeline and use it to override my animator at runtime,
    1. Assign the humanoid Animator to PlayableDirector
    2. wait until the playback finish.
    3. the PlayableDirector will remove that Animator by SetGenericBinding(null);
    4. ISSUE : the humanoid Animator become uninitialized. all the private variable being reset to default value.
    Right now I'm using hack to prevent system failure,
    to manual detect the Animator.isInitialized on Update,
    if the issue happen, re-init the whole system depend on Animator (costly).

    Q: but I would like to ask is that a way to prevent (4) happen ?!

    here is what I'm doing, setup the timeline on scene's obstacle and allow the designer to define the movement
    to get over it. and without mess the Animator on character.