This commit is contained in:
2025-01-17 13:10:42 +01:00
commit 4536213c91
15115 changed files with 1442174 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#if TEXT_TRACK_REQUIRES_TEXTMESH_PRO
using System;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;
namespace Timeline.Samples
{
// Represents the serialized data for a clip on the TextTrack
[Serializable]
public class TextPlayableAsset : PlayableAsset, ITimelineClipAsset
{
[NoFoldOut]
[NotKeyable] // NotKeyable used to prevent Timeline from making fields available for animation.
public TextPlayableBehaviour template = new TextPlayableBehaviour();
// Implementation of ITimelineClipAsset. This specifies the capabilities of this timeline clip inside the editor.
public ClipCaps clipCaps
{
get { return ClipCaps.Blending; }
}
// Creates the playable that represents the instance of this clip.
public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
{
// Using a template will clone the serialized values
return ScriptPlayable<TextPlayableBehaviour>.Create(graph, template);
}
}
}
#endif