Method CreatePlayable
CreatePlayable(PlayableGraph, GameObject)
Overrides PlayableAsset.CreatePlayable(). Not used in Timeline.
Declaration
public override sealed Playable CreatePlayable(PlayableGraph graph, GameObject go)
Parameters
Type | Name | Description |
---|---|---|
PlayableGraph | graph | The graph to inject playables into.The game object which initiated the build. |
GameObject | go | The graph to inject playables into.The game object which initiated the build. |
Returns
Type | Description |
---|---|
Playable | The playable injected into the graph, or the root playable if multiple playables are injected. |
Overrides
CreatePlayable(PlayableGraph, GameObject, TimelineClip)
Constructs a Playable from a TimelineClip.
Declaration
protected virtual Playable CreatePlayable(PlayableGraph graph, GameObject gameObject, TimelineClip clip)
Parameters
Type | Name | Description |
---|---|---|
PlayableGraph | graph | PlayableGraph that will own the playable. |
GameObject | gameObject | The GameObject that builds the PlayableGraph. |
TimelineClip | clip | The TimelineClip to construct a playable for. |
Returns
Type | Description |
---|---|
Playable | A playable that will be set as an input to the Track Mixer playable, or Playable.Null if the clip does not have a valid PlayableAsset |
Remarks
By default, this method invokes Playable.CreatePlayable, sets animated properties, and sets the speed of the created playable. Override this method to change this default implementation.
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if the specified PlayableGraph is not valid. |
ArgumentNullException | Thrown if the specified TimelineClip is not valid. |