- Home /
Question by
Flownerous · Apr 26, 2012 at 11:31 AM ·
particlesshuriken
Shuriken ParticleSystem.Emit not immediate
The documentation says:
http://unity3d.com/support/documentation/ScriptReference/ParticleSystem.Emit.html
Emit count particles immediately. If the particle system is not playing it will start playing.
Example:
ParticleSystem.Particle[] particles = new ParticleSystem.Particle[100];
ps.Emit(10);
int count = ps.GetParticles(particles); // count is 0
ps.Simulate(0.5f);
count = ps.GetParticles(particles); // count is 10
My use case:
I want to spawn particles in a script over time. I'd like them to be spawned with all the position / velocity / size according to how the system was set up in the editor. I then want to modify them to be positioned in 2D (zero out their position and velocity z) before they actually start simulating. This appears to only be possible if I spawn them myself and choose the position/velocity/size myself which means ditching all the settings in the editor or recreating them :(
Comment