I'm using dummy activation track clips as markers. Would it be possible to set a GUI text field to the name of the clip currently active?
What do you mean by currently active? If it's 'selected' the following would work: Code (CSharp): var serializedObject = new SerializedObject(Selection.activeObject); var nameProperty = serializedObject.FindProperty("m_Item.m_DisplayName"); if (nameProperty != null) EditorGUILayout.PropertyField(nameProperty); serializedObject.ApplyModifiedProperties(); Otherwise, if you are looking for where the time head is at, you will need some combination of the time (playableDirector.time), and searching for the desired track (TimelineAsset.GetOutputTracks()) and the correct clip (TrackAsset.GetClips()).
Yes, I'm looking at the time head position in the Play mode. Do you happen to have a code sample for that?
Something like: Code (CSharp): var time = playableDirector.time; var timeline = playableDirector.playableAsset as TimelineAsset; TimelineClip[] activeClips = timeline.GetOutputTracks().SelectMany(t => t.GetClips().Where(c => c.start >= t && c.end < time)).ToArray();
Changed Code (CSharp): Where(c => c.start >= t && c.end < time)) to Code (CSharp): Where(c => c.start >= time && c.end < time)) but activeClips stays empty