TextSwitcherClip.cs 542 B

1234567891011121314151617181920
  1. using System;
  2. using UnityEngine;
  3. using UnityEngine.Playables;
  4. using UnityEngine.Timeline;
  5. [Serializable]
  6. public class TextSwitcherClip : PlayableAsset, ITimelineClipAsset
  7. {
  8. public TextSwitcherBehaviour template = new TextSwitcherBehaviour ();
  9. public ClipCaps clipCaps
  10. {
  11. get { return ClipCaps.Blending; }
  12. }
  13. public override Playable CreatePlayable (PlayableGraph graph, GameObject owner)
  14. {
  15. var playable = ScriptPlayable<TextSwitcherBehaviour>.Create (graph, template);
  16. return playable; }
  17. }