Pixelpart 1.8.2
Unity Plugin
Loading...
Searching...
No Matches
PixelpartEffect Class Reference

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.
 

Detailed Description

Node that plays a Pixelpart effect.

This class offers methods and properties to change how the effect is simulated and rendered.

Member Function Documentation

◆ ActivateTrigger()

void ActivateTrigger ( string triggerName)

Activate trigger triggerName .

Parameters
triggerNameName of the trigger

◆ FindCollider()

PixelpartCollider FindCollider ( string nodeName)

Return the collider with the given name. Deprecated, use FindNode.

Parameters
nodeNameNode name
Returns
Node or null if no node with this name exists

◆ FindForceField()

PixelpartForceField FindForceField ( string nodeName)

Return the force field with the given name. Deprecated, use FindNode.

Parameters
nodeNameNode name
Returns
Node or null if no node with this name exists

◆ FindNode()

PixelpartNode FindNode ( string nodeName)

Return the node with the given name.

Parameters
nodeNameNode name
Returns
Node or null if no node with this name exists

◆ FindParticleEmitter()

PixelpartParticleEmitter FindParticleEmitter ( string nodeName)

Return the particle emitter with the given name. Deprecated, use FindNode.

Parameters
nodeNameNode name
Returns
Node or null if no node with this name exists

◆ FindParticleType()

PixelpartParticleType FindParticleType ( string particleTypeName)

Return the particle type with the given name.

Parameters
particleTypeNameParticle type name
Returns
Particle type or null if no particle type with this name exists

◆ GetCollider()

PixelpartCollider GetCollider ( uint id)

Return the collider with the given ID. Deprecated, use GetNode.

Parameters
idNode ID
Returns
Node or null if no node with this ID exists

◆ GetColliderAtIndex()

PixelpartCollider GetColliderAtIndex ( int index)

Return the collider at the given index. Deprecated, use GetNodeAtIndex.

Parameters
idNode index, starting from 0
Returns
Node or null if no node at this index exists

◆ GetForceField()

PixelpartForceField GetForceField ( uint id)

Return the force field with the given ID. Deprecated, use GetNode.

Parameters
idNode ID
Returns
Node or null if no node with this ID exists

◆ GetForceFieldAtIndex()

PixelpartForceField GetForceFieldAtIndex ( int index)

Return the force field at the given index. Deprecated, use GetNodeAtIndex.

Parameters
idNode index, starting from 0
Returns
Node or null if no node at this index exists

◆ GetInputBool()

bool GetInputBool ( string inputName)

Return value of an effect input. The effect input must be of type bool.

Parameters
inputNameName of the effect input
Returns
Value of the effect input

◆ GetInputFloat()

float GetInputFloat ( string inputName)

Return value of an effect input. The effect input must be of type float.

Parameters
inputNameName of the effect input
Returns
Value of the effect input

◆ GetInputFloat2()

Vector2 GetInputFloat2 ( string inputName)

Return value of an effect input. The effect input must be of type Vector2.

Parameters
inputNameName of the effect input
Returns
Value of the effect input

◆ GetInputFloat3()

Vector3 GetInputFloat3 ( string inputName)

Return value of an effect input. The effect input must be of type Vector3.

Parameters
inputNameName of the effect input
Returns
Value of the effect input

◆ GetInputFloat4()

Vector4 GetInputFloat4 ( string inputName)

Return value of an effect input. The effect input must be of type Vector4.

Parameters
inputNameName of the effect input
Returns
Value of the effect input

◆ GetInputInt()

int GetInputInt ( string inputName)

Return value of an effect input. The effect input must be of type int.

Parameters
inputNameName of the effect input
Returns
Value of the effect input

◆ GetNode()

PixelpartNode GetNode ( uint id)

Return the node with the given ID.

Parameters
idNode ID
Returns
Node or null if no node with this ID exists

◆ GetNodeAtIndex()

PixelpartNode GetNodeAtIndex ( int index)

Return the node at the given index.

Parameters
indexNode index, starting from 0
Returns
Node or null if no node at this index exists

◆ GetParticleEmitter()

PixelpartParticleEmitter GetParticleEmitter ( uint id)

Return the particle emitter with the given ID. Deprecated, use GetNode.

Parameters
idNode ID
Returns
Node or null if no node with this ID exists

◆ GetParticleEmitterAtIndex()

PixelpartParticleEmitter GetParticleEmitterAtIndex ( int index)

Return the particle emitter at the given index. Deprecated, use GetNodeAtIndex.

Parameters
idNode index, starting from 0
Returns
Node or null if no node at this index exists

◆ GetParticleType()

PixelpartParticleType GetParticleType ( uint id)

Return the particle type with the given ID.

Parameters
idParticle type ID
Returns
Particle type or null if no particle type with this ID exists

◆ GetParticleTypeAtIndex()

PixelpartParticleType GetParticleTypeAtIndex ( int index)

Return the particle type at the given index.

Parameters
indexParticle type index
Returns
Particle type or null if no particle type at this index exists

◆ IsTriggerActivated()

bool IsTriggerActivated ( string triggerName)

Return whether trigger triggerName was activated.

Parameters
triggerNameName of the trigger
Returns
true if the trigger was activated

◆ SetInputBool()

void SetInputBool ( string inputName,
bool value )

Set the effect input inputName to the given value. The effect input must be of type bool.

Parameters
inputNameName of the effect input
valueNew value

◆ SetInputFloat()

void SetInputFloat ( string inputName,
float value )

Set the effect input inputName to the given value. The effect input must be of type float.

Parameters
inputNameName of the effect input
valueNew value

◆ SetInputFloat2()

void SetInputFloat2 ( string inputName,
Vector2 value )

Set the effect input inputName to the given value. The effect input must be of type Vector2.

Parameters
inputNameName of the effect input
valueNew value

◆ SetInputFloat3()

void SetInputFloat3 ( string inputName,
Vector3 value )

Set the effect input inputName to the given value. The effect input must be of type Vector3.

Parameters
inputNameName of the effect input
valueNew value

◆ SetInputFloat4()

void SetInputFloat4 ( string inputName,
Vector4 value )

Set the effect input inputName to the given value. The effect input must be of type Vector4.

Parameters
inputNameName of the effect input
valueNew value

◆ SetInputInt()

void SetInputInt ( string inputName,
int value )

Set the effect input inputName to the given value. The effect input must be of type int.

Parameters
inputNameName of the effect input
valueNew value

◆ SpawnParticles()

void SpawnParticles ( string particleEmitterName,
string particleTypeName,
int count )

Generate count particles of the given type from the given emitter.

Parameters
particleEmitterNameName of the particle emitter
particleTypeNameName of the particle type
countNumber of particles to generate

Member Data Documentation

◆ EffectScale

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.

◆ LoopTime

float LoopTime = 1.0f

Time in seconds after which the effect loops.

Only effective if Loop = true.

◆ WarmupTime

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.


The documentation for this class was generated from the following file: