Like the topic says: what I am basically trying to do is use one copy of a particle system for all enemies (which is all I really need). However, my issues is that different enemies use different sort group sorting layer values. And whenever I change the sorting layer id on a particle system, it changes the sorting layer id on ALL particles from that system, not just newly made ones. Unlike some other settings available for particles
Is there a setting somewhere that allows me change the sorting order id for a particle system WITHOUT affecting existing particles?
NOTE: this is for a 2d game.
No it’s not possible - the setting applies to a whole particle system.
As Richard says, the sorting order applies to the whole system.
But for a 2D game with transparent sprites, there may be more options - though their appropriateness all heavily depend on your scene layout.
-
If you have a pixelated game, maybe you could switch to opaque materials since then your semi-transparent particles can weave in between your opaque objects. This is probably only good for newer projects since it could require fixing many things that break with the change and reorganizing your scenes. Conversely, maybe your particles could be use opaque materials though whether this works is heavily dependent on style constraints.
-
Render particles on top of your enemies then use a Sprite Mask on part of your enemy’s body, and use visible inside/outside mask on the Particle System. For instance, a Sprite Mask on the top half of your enemy can make the particles kind of like a thick fog around the feet. However, if you’re looking to condense particle systems into one then you may be trying to save performance and this solution has a performance cost so it may be counterproductive.
-
You may be able to have two particle systems (again, depending on scene). A “top” and “bottom” one, above and below your enemies. This could provide the illusion that particles sorted between enemies even though they’re not. Cheap, kinda works for some games.
None of these are ideal but maybe there’s something in there for you.
Thank you both for the feedback. I was afraid that this was an unavoidable limitation but I wanted to confirm nonetheless. I will have to go the multiple particle systems route then but with different sorting layers. Thanks again.