- Home /
Question by
Absinthe23 · Mar 09, 2016 at 12:39 AM ·
shadersmaterialssetfloat
String name for particles / additive soft particles factor
I'm trying to access the soft particles factor of the particles / additive shader in script. I'd assumed the name would be "_SoftParticlesFactor" but it's not working
renderer.material.SetFloat("_SoftParticlesFactor", 2f);
I've tried "Soft Particles Factor", "softparticlesfactor", "_softparticlesfactor" and a few other variations. Anyone know how to correctly reference it?
Thanks.
Comment
Best Answer
Answer by Necromunger · Mar 09, 2016 at 03:41 AM
When you select the shader file you are using and view it in the inspector the correct name for the attribute you want to change is found under properties.
Example:
shader.png
(27.4 kB)
Sorry I didn't get back to you, discovered for myself, but thanks for the reply