- Home /
 
 
               Question by 
               siddharth3322 · Apr 09, 2020 at 03:19 PM · 
                2dparticlesparticle systemshapeparticle emitter  
              
 
              Update Particle Shape Scale Value Through Code
I want to change my Particle system scale value at runtime through code.

 I just want to change the particle system z scale value only.
 My game area runtime gets expanded so I require to change the scale value based on this increase. 
Anyhow I require to control in the code so please guide me into this.
 
                 
                particle-system-scale-value.png 
                (23.4 kB) 
               
 
              
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by siddharth3322 · Apr 09, 2020 at 03:35 PM
Okay, I found the solution by doing some research on my side and I want to post this as a reply so it become useful to other members.
 ParticleSystem.ShapeModule particleSystemShape = spaceSparkleSystem.shape;
 particleSystemShape.scale = new Vector3(15f, 0f, GameConstants.TWO_PLANETS_DISTANCE + GameController.Instance.SpaceShipSpeedIncrease);
 
              Your answer