Search Unity

Getting Activation Track name in code.

Discussion in 'Timeline' started by username132323232, Feb 23, 2018.

  1. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Is it possible to get in code the name of the current clip on the Activation Track? I'm guessing it's
    Code (CSharp):
    1. ActivationTrack.name

    but how exactly do I get to that?
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    ActivationTrack.GetClips() gets an enumerator for the clips, and TimelineClip.displayName gets the current name.

    Not sure what you mean by 'current clip' though. If you mean Selected, that's a bit trickier as clips use an internal wrapper for Selection.
     
    username132323232 likes this.