- Home /
Question by
TiredOfCoding · Dec 08, 2016 at 12:33 PM ·
c#rendererparticle systemsorting order
How to change partcile system's order in layer through script?
I just need to change "Order In Layer" property of particle system. I can simply do it in Unity inspector, but I need to change it through script. I tried, but I did not find appropriate property of particle system's renderer
.
Comment
Best Answer
Answer by moobeidallah · Feb 12, 2017 at 05:33 PM
Make sure you use ParticleSystemRenderer, from there, it's simple:
psr.sortingOrder = valueOfMySortingOrder;
Hope it helps.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Renderer on object disabled after level reload 1 Answer