Particle System / Getting Started
The particle system can be found in the Assets/Playniax/Framework/Particle System
You can create particles by adding the Particle script to a GameObject, create a particle from a script or you can use the emitter to create particle effects.
The particle system only supports GameObjects with a SpriteRenderer (sprites).
To create a particle simply create a sprite and add the Particle
component to it.
GameObject with Particle
Example can be found in Assets/Playniax/Framework/Particle System/Scenes/Example 01 - Particle.unity
can be used to create a single particle effect or multiple emitters can be used when you need complex effects.
To create an emitter simply create a GameObject and add one or multiple Emitter
components to it.
GameObject with Emitter
button at the bottom of an emitter is very important.
button can be used to test your effect.
This works in edit mode and at runtime.
Example can be found in Assets/Playniax/Framework/Particle System/Scenes/Example 02 - Emitter.unity
can be used to play multiple emitters on the condition that the emitters are part of the same GameObject or are children of the same GameObject.
GameObject with EmitterGroup
Note that the emitter group also has a Test
Example can be found in Assets/Playniax/Framework/Particle System/Scenes/Example 03 - Emitter Group.unity
Particle effects created with emitters don't play by them selfs.
They only play when you press the Test
button, by executing them from a script or by using the EmitterPlayerEmitterPlayer
does not work in edit mode but only at runtime.EmitterPlayer
needs the Emitter
or EmitterGroup id
to know what to play.
Example can be found in Assets/Playniax/Framework/Particle System/Scenes/Example 04 - Emitter Player.unity
Execute from script
Particle effects can be executed from script.
You can execute a single emitter with the Play
Emitter.Play(id, position, parent, scale, orderInLayer, timeScale);
To execute a more complex effect the emitter group Play
command can be used:
EmitterGroup.Call(id, position, parent, scale, orderInLayer, timeScale);
the particle effects have to be in your scene or you can't execute them.