How can I change the SortingFudge parameter from a script?

I need to change the ‘SortingFudge’ parameter within the renderer of a particle system.

I tried:
Renderer ren;
ren = GetComponent();
ren.SortingFudge = -0.2f;

The script is attached to a ParticleSystem GameObject.

The problem is that VS complains that there is no such thing as SortingFudge in the renderer. The closest I could find were SortingLayerID, SortingLayerName and SortingOrder, neither of which seem to be what I need.

I can easily change it in the inspector to set up the initial value but I need also to change it during execution.

Thanks.

Renderer of Particle System uses a separate class unrelated to the Renderer class:

The Renderer on a ParticleSystem is actually a ParticleSystemRenderer. VS doesn’t yell at you about casting it as a normal Renderer because ParticleSystemRenderer inherits from it.


Just casting it as ParticleSystemRenderer:

ParticleSystemRenderer rend = this.particles.GetComponent<ParticleSystemRenderer> ();	
rend.sortingFudge = -0.2f;

should work fine.