Any tips for how to use getParticles properly…?
Just trying to get the particles in Start()…
but if I try this, the count returns 0,
then if I put the print() inside Update(), it prints 500…
public var particleObject:GameObject; // this gameobject has shuriken system
public var maxParticles:int = 500;
private var _ParticleSystem:ParticleSystem;
private var particles : ParticleSystem.Particle[];
function Start ()
{
// create particle array (do I need to set the size manually..? looks like so..)
particles = new ParticleSystem.Particle[maxParticles];
// get particle system
_ParticleSystem = particleObject.GetComponent(ParticleSystem);
// emit some particles, this works
_ParticleSystem.Emit(maxParticles);
// get those particles..
var count:int = _ParticleSystem.GetParticles(particles);
print (count); // returns 0
}