How to access the "Initial Module" of a Particle System?

I’m referring to this:

6883022--804173--upload_2021-2-26_21-50-33.png

I want to change the min and max color under Start Color, in code. But I can’t find any reference to this “Initial Module” in the ParticleSystem docs.

How do I change these colors from code?

first you call .main
and here the Doc about .main(MainModule)
https://docs.unity3d.com/ScriptReference/ParticleSystem.MainModule.html

1 Like

Thank you, that’s exactly what I needed. For the record, my code worked out to:

            var startColorModule = hitParticles.main.startColor;
            startColorModule.colorMin = value;
            startColorModule.colorMax = Color.Lerp(value, Color.white, 0.5f);
1 Like