Class ParticleControlPlayable
Playable that synchronizes a particle system simulation.
Inherited Members
Namespace: UnityEngine.Timeline
Syntax
public class ParticleControlPlayable : PlayableBehaviour, IPlayableBehaviour, ICloneable
Properties
particleSystem
The particle system to control
Declaration
public ParticleSystem particleSystem { get; }
Property Value
Type | Description |
---|---|
ParticleSystem |
Methods
Create(PlayableGraph, ParticleSystem, UInt32)
Creates a Playable with a ParticleControlPlayable behaviour attached
Declaration
public static ScriptPlayable<ParticleControlPlayable> Create(PlayableGraph graph, ParticleSystem component, uint randomSeed)
Parameters
Type | Name | Description |
---|---|---|
PlayableGraph | graph | The PlayableGraph to inject the Playable into. |
ParticleSystem | component | The particle systtem to control |
UInt32 | randomSeed | A random seed to use for particle simulation |
Returns
Type | Description |
---|---|
ScriptPlayable<ParticleControlPlayable> | Returns the created Playable. |
Initialize(ParticleSystem, UInt32)
Initializes the behaviour with a particle system and random seed.
Declaration
public void Initialize(ParticleSystem ps, uint randomSeed)
Parameters
Type | Name | Description |
---|---|---|
ParticleSystem | ps | |
UInt32 | randomSeed |
OnBehaviourPause(Playable, FrameData)
This function is called when the Playable play state is changed to PlayState.Paused.
Declaration
public override void OnBehaviourPause(Playable playable, FrameData info)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The playable this behaviour is attached to. |
FrameData | info | A FrameData structure that contains information about the current frame context. |
Overrides
OnBehaviourPlay(Playable, FrameData)
This function is called when the Playable play state is changed to Playables.PlayState.Playing.
Declaration
public override void OnBehaviourPlay(Playable playable, FrameData info)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The Playable that owns the current PlayableBehaviour. |
FrameData | info | A FrameData structure that contains information about the current frame context. |
Overrides
PrepareFrame(Playable, FrameData)
This function is called during the PrepareFrame phase of the PlayableGraph.
Declaration
public override void PrepareFrame(Playable playable, FrameData data)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The Playable that owns the current PlayableBehaviour. |
FrameData | data | A FrameData structure that contains information about the current frame context. |