- Home /
ParticleSystem: How to use texturesheet with SetParticles?
I'm using SetParticles in the new ParticleSystem to manually control particle behaviour. When I turn on the Texture Sheet Animation component in the ParticleSystem in the inspector and Play, I get this error:
psTemp.sheetIndex[i] >= 0.0f && psTemp.sheetIndex[i] <= 1.0f
I'd like to manually animate the texture tile for each particle, like I used to with the old particle system.
How to do this? Is it possible at all?
Carl Emil
Answer by zemrod101 · Feb 01, 2013 at 02:37 AM
when assigning the liftime to the particle you also need to set the startLifetime as well.
for(int i = 0; i < myParticles.Length;i++){
myParticles[i].lifetime = 100;
myParticles[i].startLifetime = 200;
}
Ah. It was because I set lifetime to float.PositiveInfinity. It works now =)
@CarlEmail please accept this as the answer if it solved your problem :)
Answer by kilik128 · Oct 12, 2013 at 08:31 PM
i have same thinks and i have try add myParticles[i].lifetime = 100; myParticles[i].startLifetime = 200;
Your answer
![](https://koobas.hobune.stream/wayback/20220613091918im_/https://answers.unity.com/themes/thub/images/avi.jpg)