Scaling Unity Particles With Transform
I was adding some particles to my Unity prototype and found myself unable to do any scaling of the particles using the game object’s transform. I wanted to programmatically scale them through the parent, but it seemed like the particle system was not affected by transform scale. After some digging, it turns out that there is a field Scaling Mode which can be set to Hierarchy. This will allow you to scale the particle via transform, and it will inherit from the parent as well.
So how do you scale the particle through transform?
From the Unity docs, the three options are hierarchy, local, and shape, with the default being local.
Hierarchy: Scale the particle system using the entire transform hierarchy.
Local: Scale the particle system using only its own transform scale. (Ignores parent scale).
Shape: Only apply transform scale to the shape component, which controls where particles are spawned, but does not affect their size or movement.
Just a small tip but was helpful for me nonetheless. Hopefully this helps you get scaling of your Unity particles right as well!
Interested in more Unity tutorials? Check them out here.
Jonathan
Hey there, I’m Jon! I love landscape photography which is why I travel all the time! On my blog I’ll share all the best spots for epic sunsets and sunrises as well as some photography tips and tricks. I also have a interest in game design so you’ll find the occasional post about that too. Thanks for visiting!
Hi!! I have the same problem.. I want to scale a particle system from code but, do your can share with me a example how to access and change the scale with this parameter?
If you change the scaling mode of the particle to ‘hierarchy’ then it will scale with transform in code.