using UnityEngine; using UnityEngine.Playables; using UnityEngine.Timeline; namespace uc.Timeline { public sealed class MoviePlayerClip : PlayableAsset, ITimelineClipAsset { //[System.NonSerialized] public MoviePlayerBase movie; public ClipCaps clipCaps { get { return ClipCaps.All & ~ClipCaps.Blending; } } public override double duration { get { if (movie != null && movie.GetDuration != 0) return movie.GetDuration; else return 5; } } public override Playable CreatePlayable(PlayableGraph graph, GameObject owner) { //owner is director's game object return Playable.Create(graph); } } }