showing a particle on an ui element in new UI system can be shown by changing render mode to “Screen Space - Camera” and setting render camera to “Main Camera” but the particle is always on the top of any UI elements.
If I want to change depth of it like behind of an ui element or above it, how can I manage it?
Unity UI uses stenciling instead of depth tests, which means it does not take depth into account when rendering. If you want your UI to be above everything else, I recommend making a separate camera for UI and setting it’s depth to higher than your gameplay camera. (you will have to make sure the UI camera is set to “clear depth” and not “clear solid color” or “clear skybox”)
I’ve had the same problem, layering UI and non-UI can be a huge pain. I moved things around in the hierarchy and in the scene to try to get them layered correctly, and sometimes I would, but it would always mess up again later.
I’m sorry to say the only complete solution I’ve found for this is the layered cameras method.