particleSystem.maxParticles

I am baffled by this.

particleSystem.maxParticles doesn’t appear to be a valid way to access the maximum allowed particles in a particle system. My searching has shown that there is no way to set max particles in unity anymore. I just can’t believe that is true. Is that really the case?

This has likely been asked before but the search feature is broken right now. And Google has shown a few threads that basically have no answer.

I am using 4.2.2

Yeah, unfortunately Shuriken seems to be a bit of an unloved stepchild at the moment, with regards to scripting access. There is so little of it exposed to the API, such a massive step backwards compared to the legacy system. Quite disappointing, really, as it’s been this way for a good long while (hell, it was only very recently that collisions were exposed to the API, and even that is quite messy, imho)

Crazy. I’m getting into the optimization stages of my project and seems max texture resolution is also not accessible. Fine tuned controls over particle amounts and texture sizes seems like a fundamental necessity in optimization. Maybe in the near future we can get access to max particles. It even shows in the documentation as being available, but just simply isn’t there.

This seems to be a bug no? I also tried accessing maxParticles property, as per the documentation, and it is indeed unavailable… has anyone reported to Unity or should I?

I looked for a while for this and was almost convinced it was impossible, but there was no way I was going to have the fire in my game not realistically turn on and off. My ego couldn’t handle it. And let me preface that this may not be what you guys were talking about or looking for, I didn’t read much of the thread, but I was confused on this so maybe it’ll help you guys too…

setting particle system stuff something like this…

ParticleSystem[ ] pz = GetComponentsInChildren();
for (int i = 0; i < pz.Length; i++)
{
ParticleSystem.MainModule m = pz*.main;*
m.maxParticles = 69420bro;
ParticleSystem.EmissionModule em = pz*.emission;*
em.enabled = false;
}
found it here…
_*https://docs.unity3d.com/ScriptReference/ParticleSystem-main.html*_
cheers!

@ sirdudalot it worked for me! I was making a laser beam and wanted the particles to flow smoothly. that code helped and I was able to control the max particles via script. Thanks!

Thanks a lot for this!