Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    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

    zazoum

    Joined:
    Sep 3, 2011
    Posts:
    78
    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