From c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 19 Apr 2020 17:19:32 -0400 Subject: Inital commit --- .../Runtime/Playables/BasicScriptPlayable.cs | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/BasicScriptPlayable.cs (limited to 'Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/BasicScriptPlayable.cs') diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/BasicScriptPlayable.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/BasicScriptPlayable.cs new file mode 100644 index 0000000..0157958 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/BasicScriptPlayable.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// This class is deprecated. It is recommended to use Playable Asset and Playable Behaviour derived classes instead. + /// + [Serializable] + [Obsolete("For best performance use PlayableAsset and PlayableBehaviour.")] + public class BasicPlayableBehaviour : ScriptableObject, IPlayableAsset, IPlayableBehaviour + { + public BasicPlayableBehaviour() {} + + /// + /// The playback duration in seconds of the instantiated Playable. + /// + public virtual double duration { get { return PlayableBinding.DefaultDuration; } } + + /// + ///A description of the outputs of the instantiated Playable. + /// + public virtual IEnumerable outputs { get { return PlayableBinding.None; } } + + /// + /// This function is called when the PlayableGraph that owns this PlayableBehaviour starts. + /// + /// The Playable that owns the current PlayableBehaviour. + public virtual void OnGraphStart(Playable playable) {} + + /// + /// This function is called when the PlayableGraph that owns this PlayableBehaviour stops. + /// + /// The Playable that owns the current PlayableBehaviour. + public virtual void OnGraphStop(Playable playable) {} + + /// + /// This function is called when the Playable that owns the PlayableBehaviour is created. + /// + /// The Playable that owns the current PlayableBehaviour. + public virtual void OnPlayableCreate(Playable playable) {} + + /// + /// This function is called when the Playable that owns the PlayableBehaviour is destroyed. + /// + /// The Playable that owns the current PlayableBehaviour. + public virtual void OnPlayableDestroy(Playable playable) {} + + /// + /// This function is called when the Playable play state is changed to Playables.PlayState.Playing. + /// + /// The Playable that owns the current PlayableBehaviour. + /// A FrameData structure that contains information about the current frame context. + public virtual void OnBehaviourPlay(Playable playable, FrameData info) {} + + /// + /// This function is called when the Playable play state is changed to Playables.PlayState.Paused. + /// + /// The Playable that owns the current PlayableBehaviour. + /// A FrameData structure that contains information about the current frame context. + public virtual void OnBehaviourPause(Playable playable, FrameData info) {} + + /// + /// This function is called during the PrepareFrame phase of the PlayableGraph. + /// + /// The Playable that owns the current PlayableBehaviour. + /// A FrameData structure that contains information about the current frame context. + public virtual void PrepareFrame(Playable playable, FrameData info) {} + + /// + /// This function is called during the ProcessFrame phase of the PlayableGraph. + /// + /// The Playable that owns the current PlayableBehaviour. + /// A FrameData structure that contains information about the current frame context. + /// The user data of the ScriptPlayableOutput that initiated the process pass. + public virtual void ProcessFrame(Playable playable, FrameData info, object playerData) {} + + /// + /// Implement this method to have your asset inject playables into the given graph. + /// + /// The graph to inject playables into. + /// The game object which initiated the build. + /// The playable injected into the graph, or the root playable if multiple playables are injected. + public virtual Playable CreatePlayable(PlayableGraph graph, GameObject owner) + { + return ScriptPlayable.Create(graph, this); + } + } +} -- cgit v1.2.3