Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    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

Set state motion clip at runtime?

Discussion in 'Animation' started by coshea, Jan 13, 2021.

  1. coshea


    Dec 20, 2012
    I've got a body layer and another layer (in animator) that syncs with the body layer. I want the motion clips in the state machine of the second layer to match the body layer that it syncs with.

    Ideally I'd like to do this without having to set the motion clips for every state in the 2nd layer manually.

    Can you set the motion clip used by a state with code?

    Last edited: Jan 20, 2021