Search Unity

Trigger a timeline from the state machine?

Discussion in 'Timeline' started by msmithUnity, Dec 17, 2018.

  1. msmithUnity

    msmithUnity

    Joined:
    Jun 19, 2015
    Posts:
    12
    Hey folks,

    I'm using the animator controller state machine and have conditions with boolean parameters to transition between states. The states have an animation clip assigned to them. Rather than trigger an animation clip though, it would be much simpler if they triggered one of the new timelines that has multiple animation clips. Is this possible? I saw posts from 2017 that said this was coming in 2018. Currently running 2018.3

    Thanks
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    No, it's not possible to use timelines directly in state machines yet. To play a timeline from a state machine requires scripting.
     
    msmithUnity likes this.
  3. msmithUnity

    msmithUnity

    Joined:
    Jun 19, 2015
    Posts:
    12
    Ok, thanks. Is the best practice for doing that to add a statemachinebehavior and start the timeline in OnStateEnter event?
     
  4. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    I believe that would work just fine.
     
    msmithUnity likes this.