![]() |
Pixelpart 1.8.2
Unity Plugin
|
Node that plays a Pixelpart effect. More...
Public Member Functions | |
PixelpartEffect () | |
Construct PixelpartEffect. | |
void | RestartEffect () |
Restart the effect and remove all existing particles. | |
void | ResetEffect () |
Restart the effect, but do not remove existing particles. | |
void | SpawnParticles (string particleEmitterName, string particleTypeName, int count) |
Generate count particles of the given type from the given emitter. | |
void | SetInputBool (string inputName, bool value) |
Set the effect input inputName to the given value. The effect input must be of type bool . | |
void | SetInputInt (string inputName, int value) |
Set the effect input inputName to the given value. The effect input must be of type int . | |
void | SetInputFloat (string inputName, float value) |
Set the effect input inputName to the given value. The effect input must be of type float . | |
void | SetInputFloat2 (string inputName, Vector2 value) |
Set the effect input inputName to the given value. The effect input must be of type Vector2 . | |
void | SetInputFloat3 (string inputName, Vector3 value) |
Set the effect input inputName to the given value. The effect input must be of type Vector3 . | |
void | SetInputFloat4 (string inputName, Vector4 value) |
Set the effect input inputName to the given value. The effect input must be of type Vector4 . | |
bool | GetInputBool (string inputName) |
Return value of an effect input. The effect input must be of type bool . | |
int | GetInputInt (string inputName) |
Return value of an effect input. The effect input must be of type int . | |
float | GetInputFloat (string inputName) |
Return value of an effect input. The effect input must be of type float . | |
Vector2 | GetInputFloat2 (string inputName) |
Return value of an effect input. The effect input must be of type Vector2 . | |
Vector3 | GetInputFloat3 (string inputName) |
Return value of an effect input. The effect input must be of type Vector3 . | |
Vector4 | GetInputFloat4 (string inputName) |
Return value of an effect input. The effect input must be of type Vector4 . | |
void | ActivateTrigger (string triggerName) |
Activate trigger triggerName . | |
bool | IsTriggerActivated (string triggerName) |
Return whether trigger triggerName was activated. | |
PixelpartNode | FindNode (string nodeName) |
Return the node with the given name. | |
PixelpartNode | GetNode (uint id) |
Return the node with the given ID. | |
PixelpartNode | GetNodeAtIndex (int index) |
Return the node at the given index. | |
PixelpartParticleType | FindParticleType (string particleTypeName) |
Return the particle type with the given name. | |
PixelpartParticleType | GetParticleType (uint id) |
Return the particle type with the given ID. | |
PixelpartParticleType | GetParticleTypeAtIndex (int index) |
Return the particle type at the given index. | |
PixelpartParticleEmitter | FindParticleEmitter (string nodeName) |
Return the particle emitter with the given name. Deprecated, use FindNode. | |
PixelpartForceField | FindForceField (string nodeName) |
Return the force field with the given name. Deprecated, use FindNode. | |
PixelpartCollider | FindCollider (string nodeName) |
Return the collider with the given name. Deprecated, use FindNode. | |
PixelpartParticleEmitter | GetParticleEmitter (uint id) |
Return the particle emitter with the given ID. Deprecated, use GetNode. | |
PixelpartForceField | GetForceField (uint id) |
Return the force field with the given ID. Deprecated, use GetNode. | |
PixelpartCollider | GetCollider (uint id) |
Return the collider with the given ID. Deprecated, use GetNode. | |
PixelpartParticleEmitter | GetParticleEmitterAtIndex (int index) |
Return the particle emitter at the given index. Deprecated, use GetNodeAtIndex. | |
PixelpartForceField | GetForceFieldAtIndex (int index) |
Return the force field at the given index. Deprecated, use GetNodeAtIndex. | |
PixelpartCollider | GetColliderAtIndex (int index) |
Return the collider at the given index. Deprecated, use GetNodeAtIndex. | |
Public Attributes | |
PixelpartEffectAsset | EffectAsset = null |
Effect resource that is shown. | |
bool | Playing = true |
Whether the effect is currently playing or not. | |
bool | Loop = false |
Whether the effect restarts automatically after time LoopTime . | |
float | LoopTime = 1.0f |
Time in seconds after which the effect loops. | |
float | WarmupTime = 0.0f |
Time in seconds the effect is pre-simulated before being rendered. | |
float | Speed = 1.0f |
How fast the effect is being played. | |
float | FrameRate = 60.0f |
At which rate the effect is simulated, in frames per second. | |
float | EffectScale = 1.0f |
Multiplier for the size of the effect. | |
bool | FlipH = false |
Whether the effect is flipped horizontally. | |
bool | FlipV = false |
Whether the effect is flipped vertically. | |
List< string > | ParticleTypeNames = new List<string>() |
Names of particle types in the effect. | |
List< Material > | ParticleMaterials = new List<Material>() |
Material of each particle type in ParticleTypeNames. | |
Properties | |
bool | Is3D [get] |
Whether the effect is a 3D effect. | |
float | CurrentTime [get] |
Time in seconds since the effect has started playing. | |
Node that plays a Pixelpart effect.
This class offers methods and properties to change how the effect is simulated and rendered.
void ActivateTrigger | ( | string | triggerName | ) |
Activate trigger triggerName .
triggerName | Name of the trigger |
PixelpartCollider FindCollider | ( | string | nodeName | ) |
Return the collider with the given name. Deprecated, use FindNode.
nodeName | Node name |
null
if no node with this name existsPixelpartForceField FindForceField | ( | string | nodeName | ) |
Return the force field with the given name. Deprecated, use FindNode.
nodeName | Node name |
null
if no node with this name existsPixelpartNode FindNode | ( | string | nodeName | ) |
Return the node with the given name.
nodeName | Node name |
null
if no node with this name existsPixelpartParticleEmitter FindParticleEmitter | ( | string | nodeName | ) |
Return the particle emitter with the given name. Deprecated, use FindNode.
nodeName | Node name |
null
if no node with this name existsPixelpartParticleType FindParticleType | ( | string | particleTypeName | ) |
Return the particle type with the given name.
particleTypeName | Particle type name |
null
if no particle type with this name existsPixelpartCollider GetCollider | ( | uint | id | ) |
Return the collider with the given ID. Deprecated, use GetNode.
id | Node ID |
null
if no node with this ID existsPixelpartCollider GetColliderAtIndex | ( | int | index | ) |
Return the collider at the given index. Deprecated, use GetNodeAtIndex.
id | Node index, starting from 0 |
null
if no node at this index existsPixelpartForceField GetForceField | ( | uint | id | ) |
Return the force field with the given ID. Deprecated, use GetNode.
id | Node ID |
null
if no node with this ID existsPixelpartForceField GetForceFieldAtIndex | ( | int | index | ) |
Return the force field at the given index. Deprecated, use GetNodeAtIndex.
id | Node index, starting from 0 |
null
if no node at this index existsbool GetInputBool | ( | string | inputName | ) |
Return value of an effect input. The effect input must be of type bool
.
inputName | Name of the effect input |
float GetInputFloat | ( | string | inputName | ) |
Return value of an effect input. The effect input must be of type float
.
inputName | Name of the effect input |
Vector2 GetInputFloat2 | ( | string | inputName | ) |
Return value of an effect input. The effect input must be of type Vector2
.
inputName | Name of the effect input |
Vector3 GetInputFloat3 | ( | string | inputName | ) |
Return value of an effect input. The effect input must be of type Vector3
.
inputName | Name of the effect input |
Vector4 GetInputFloat4 | ( | string | inputName | ) |
Return value of an effect input. The effect input must be of type Vector4
.
inputName | Name of the effect input |
int GetInputInt | ( | string | inputName | ) |
Return value of an effect input. The effect input must be of type int
.
inputName | Name of the effect input |
PixelpartNode GetNode | ( | uint | id | ) |
Return the node with the given ID.
id | Node ID |
null
if no node with this ID existsPixelpartNode GetNodeAtIndex | ( | int | index | ) |
Return the node at the given index.
index | Node index, starting from 0 |
null
if no node at this index existsPixelpartParticleEmitter GetParticleEmitter | ( | uint | id | ) |
Return the particle emitter with the given ID. Deprecated, use GetNode.
id | Node ID |
null
if no node with this ID existsPixelpartParticleEmitter GetParticleEmitterAtIndex | ( | int | index | ) |
Return the particle emitter at the given index. Deprecated, use GetNodeAtIndex.
id | Node index, starting from 0 |
null
if no node at this index existsPixelpartParticleType GetParticleType | ( | uint | id | ) |
Return the particle type with the given ID.
id | Particle type ID |
null
if no particle type with this ID existsPixelpartParticleType GetParticleTypeAtIndex | ( | int | index | ) |
Return the particle type at the given index.
index | Particle type index |
null
if no particle type at this index existsbool IsTriggerActivated | ( | string | triggerName | ) |
Return whether trigger triggerName was activated.
triggerName | Name of the trigger |
true
if the trigger was activatedvoid SetInputBool | ( | string | inputName, |
bool | value ) |
Set the effect input inputName to the given value. The effect input must be of type bool
.
inputName | Name of the effect input |
value | New value |
void SetInputFloat | ( | string | inputName, |
float | value ) |
Set the effect input inputName to the given value. The effect input must be of type float
.
inputName | Name of the effect input |
value | New value |
void SetInputFloat2 | ( | string | inputName, |
Vector2 | value ) |
Set the effect input inputName to the given value. The effect input must be of type Vector2
.
inputName | Name of the effect input |
value | New value |
void SetInputFloat3 | ( | string | inputName, |
Vector3 | value ) |
Set the effect input inputName to the given value. The effect input must be of type Vector3
.
inputName | Name of the effect input |
value | New value |
void SetInputFloat4 | ( | string | inputName, |
Vector4 | value ) |
Set the effect input inputName to the given value. The effect input must be of type Vector4
.
inputName | Name of the effect input |
value | New value |
void SetInputInt | ( | string | inputName, |
int | value ) |
Set the effect input inputName to the given value. The effect input must be of type int
.
inputName | Name of the effect input |
value | New value |
void SpawnParticles | ( | string | particleEmitterName, |
string | particleTypeName, | ||
int | count ) |
Generate count particles of the given type from the given emitter.
particleEmitterName | Name of the particle emitter |
particleTypeName | Name of the particle type |
count | Number of particles to generate |
float EffectScale = 1.0f |
Multiplier for the size of the effect.
Adjust this value if the effect appears too small or too large in the scene.
float LoopTime = 1.0f |
Time in seconds after which the effect loops.
Only effective if Loop = true
.
float WarmupTime = 0.0f |
Time in seconds the effect is pre-simulated before being rendered.
This value impacts performance and should be kept as low as possible.