Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. 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

How to stop an Animator.State in an Additive Layer

Discussion in '2017.1 Beta' started by zazoum, Jul 8, 2017.

  1. zazoum


    Sep 3, 2011
    I have 2 Layers.
    Each one has a 100-frame state animation looping.
    Second layer is Additive.

    I wan't to loop state as default in layer 1, and set the frame AND STOP THERE in Layer 2.
    Setting the frame is this:

    Code (CSharp):
    1. GetComponent<Animator>().Play("Pose", 1, setFrameFloat);
    The float setFrameFloat is 0 to 1 and works wonders with the 100-frame clip of the State.

    But, how do I stop it there???

    The speed property if set to 0.0f freezes the whole animator, not just the particular State, in the particular Layer.
    I'm using 2017.1.0f1

    NEVERMIND:It works the old way.
    Last edited: Jul 8, 2017