ScreenFaderClip.cs 538 B

1234567891011121314151617181920
  1. using System;
  2. using UnityEngine;
  3. using UnityEngine.Playables;
  4. using UnityEngine.Timeline;
  5. [Serializable]
  6. public class ScreenFaderClip : PlayableAsset, ITimelineClipAsset
  7. {
  8. public ScreenFaderBehaviour template = new ScreenFaderBehaviour ();
  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<ScreenFaderBehaviour>.Create (graph, template);
  16. return playable; }
  17. }