File size: 1,089 Bytes
18a519f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #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
|