Brak opisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TextPlayableAsset.cs 1.1KB

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