A game about forced loneliness, made by TACStudios
1#if TEXT_TRACK_REQUIRES_TEXTMESH_PRO
2
3using System;
4using UnityEngine;
5using UnityEngine.Playables;
6using UnityEngine.Timeline;
7
8namespace Timeline.Samples
9{
10 // Represents the serialized data for a clip on the TextTrack
11 [Serializable]
12 public class TextPlayableAsset : PlayableAsset, ITimelineClipAsset
13 {
14 [NoFoldOut]
15 [NotKeyable] // NotKeyable used to prevent Timeline from making fields available for animation.
16 public TextPlayableBehaviour template = new TextPlayableBehaviour();
17
18 // Implementation of ITimelineClipAsset. This specifies the capabilities of this timeline clip inside the editor.
19 public ClipCaps clipCaps
20 {
21 get { return ClipCaps.Blending; }
22 }
23
24 // Creates the playable that represents the instance of this clip.
25 public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
26 {
27 // Using a template will clone the serialized values
28 return ScriptPlayable<TextPlayableBehaviour>.Create(graph, template);
29 }
30 }
31}
32
33#endif