Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Unity 2019 - Error with keepAnimatorControllerStateOnDisable

Discussion in 'Scripting' started by Jakeiiii, May 10, 2019.

  1. Jakeiiii

    Jakeiiii

    Joined:
    Jul 7, 2014
    Posts:
    258
    I've updated my project from 2018.3.8f1 to 2019.1.0f2 and I can no longer use the setting on my Animator Controllers to keep the state on disable. This is the code I have:

    foreach (Animator a in fullObj.GetComponentsInChildren<Animator>())
    a.keepAnimatorControllerStateOnDisable = true;


    And this is the error I get:

    Assertion failed on expression: 'm_BindingsDataSet.m_GenericBindingConstant != NULL'
    UnityEngine.Animator:set_keepAnimatorControllerStateOnDisable(Boolean)


    I can't find another way to set this value other than to manually set it on each object in the editor through the Debug inspector of the Animator component... which is inconvenient, and really this should work.
     
    Last edited: May 10, 2019
  2. Jakeiiii

    Jakeiiii

    Joined:
    Jul 7, 2014
    Posts:
    258
  3. Danoli3

    Danoli3

    Joined:
    Sep 12, 2017
    Posts:
    10
    Happening on 2018.4.2 as well

    Any bug reports on this?
     
  4. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    5,019
    You should report this as a bug, as well as post a thread in the Animation forum.
     
  5. henriqueranj

    henriqueranj

    Joined:
    Feb 18, 2016
    Posts:
    151
    I am facing the same error now that I updated a project from Unity 2018.3.1f1 to 2018.4.2f1.

    This happens when applying
    _animator.keepAnimatorControllerStateOnDisable = true;
    when the GameObject is disabled.
     
unityunity