- Home /
How to change particle system scale value with script
Hello, how do I change this value :
in a script. So I want to change this value depending on the slider value. So if the slider value increases the scale X should also increase, how do I do that? Thanks in advance.
Answer by unity_G2yrNlWYdpJKuw · Oct 30, 2017 at 02:01 PM
Nvm got it to work, if anyone needs the solution it's here :
part = GetComponent<ParticleSystem>();
var sh = part.shape;
sh.scale = new Vector3 (x, y, z);
replace x, y, z with the numbers you want
Your answer
Follow this Question
Related Questions
GameObject keeps acting like gameObject. 1 Answer
Resizing an object with a particle system attached? 0 Answers
Exporting Fbx to Unity makes the model deformed even after doing scale compensation off 0 Answers
Unity: Attaching a volume control slider that doesn't always exist, to another object. 0 Answers
Unity 5 - Particle Systems with Prewarmed Particles not working properly 2 Answers