unity change particle system sorting layer via script code example
Example: unity change particle system sorting layer via script
ParticleSystem myParticleSystem;
myParticleSystem.GetComponent<ParticleSystemRenderer>().sortingOrder = 0;
ParticleSystem myParticleSystem;
myParticleSystem.GetComponent<ParticleSystemRenderer>().sortingOrder = 0;