Customize the title of timeline clips

Is there a way to customize the title of timeline clips so they are more descriptive? If not, this could be a cool feature to add.

In my screenshot below, it would be nice to replace the text “PaperActorPlayableClip” with something more descriptive like "Set Emotion: Happy"

If you select the clip in the timeline you can set the name in the top of the inspector

Oops, I missed that somehow. Thanks!

This can be accomplished in code as well (automagically). After creating the set of scripts in the Playable Wizard, in the ‘drawer’ script’s OnGUI() method, access the DisplayName. For example, in a custom track for something using AudioClip’s (exposed as exposedAudioClipField in the Behavior), set the clip DisplayName to the name of the AudioClip like so:

// Grab the track clip and the AudioClip from the custom 'clip' script
var clip = property.serializedObject.targetObject as CustomAudioClip;
AudioClip audioClip = clip.template.exposedAudioClipField;

// Assume that the currently selected object is the internal class UnityEditor.Timeline.EditorClip
// this gives you access to the clip start, duration etc.
SerializedObject editorGUI = new SerializedObject(Selection.activeObject);

// Grab the clip title, set new title
SerializedProperty title = editorGUI.FindProperty("m_Clip.m_DisplayName");
title.stringValue = audioClip.name;
               
editorGUI.ApplyModifiedProperties();

This was tested in Unity version 2017.1.

1 Like

Note for Unity 2017.2+, the property root is “m_Item” vice “m_Clip”.