Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Animation Parameters stomping each other

Discussion in 'Animation' started by camposanto_will, May 12, 2014.

  1. camposanto_will

    camposanto_will

    Joined:
    Dec 11, 2013
    Posts:
    4
    I am seeing an issue where if I set an Animation Parameter as an Integer or a bool, and then also set an animation trigger that same frame, I lose the integer or bool I set originally.

    IE:

    animator.SetInt( "HoldingObject", 1 );
    animator.SetTrigger( "LookAtObjectAnimation" );

    I do not get my variable, HoldingObject, set to 1 in the above case.

    While I can work around this without too much difficulty, I am wondering if others are seeing this, and if it is on Unity's radar. This doesn't seem like expected behavior to me.
     
  2. camposanto_will

    camposanto_will

    Joined:
    Dec 11, 2013
    Posts:
    4
    So, nevermind.

    The problem is that Animator Override Controllers reset parameters.

    Which, is probably worth a different topic.

    Until then, it would appear that any changes you make to Animation Parameters while an Override Controller is on only get set for that Controller.

    Furthermore, all parameters get set to default when you set or unset an override controller.