Search Unity

Assign Animator component to an AnimationTrack in script

Discussion in 'Timeline' started by ArSplln, May 5, 2020.

  1. ArSplln

    ArSplln

    Joined:
    Jan 17, 2018
    Posts:
    7
    Hello !

    I want to assign an animator to the first animation track on my timeline.
    I know I need to use PlayableDirector.SetGenereciBinding(_MyFirstAnimationTrack, _MyAnimator)
    But i don't know how to get properly set this animation track, I can't use public to set it in inspector.

    Is there a way to say that my AnimationTrack is the first entity of my PlayableBinding ?

     

    Attached Files:

  2. ArSplln

    ArSplln

    Joined:
    Jan 17, 2018
    Posts:
    7
    i found
     

    Attached Files:

  3. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    The order of the outputs is the order of the tracks in the editor, and creating new tracks via script on a timeline asset are placed at the end of the list.