Closed tanakataiki closed 3 years ago
Someone correct me if I'm wrong, but I believe you can just do:
visualEffect.SetFloat("parameter", 0);
where parameter is the name of the parameter you want to set as a string.
Bump on this, can't find a way to control my spawn rate via a script...
the SetFloat method from UnityEngine.Experimental.VFX.VisualEffect
is not working, I have Value type for 'SpawnRate' is incorrect
but it's the exact same name for the paramater.
EDIT : Nevermind, I forgot my parameter was Int and not float...
Does anybody tell me how to set vfx block parameters from script? It's shown in inspector yet I dont know how to get componet and parameters that I can set.