How to place a Particle between 2 UI objects?

I need help implementing that scene: i want as result for example a light effect behind a chest in my shop page, so the elements are:

UI Panel → Particle → UI Image

I read about making 2 different Canvas, but i was not able to implement it. Can i have a little help? Is this the only way to reach my result?

Thanks in advance to everyone and sorry for eng.

there are only cards. I cant quite figure out a pattern but its always another card in the same list. So I have 6 cards splayed out and when I click the 3rd card it will act as if I clicked the first. Edit: the more I mess around with it the more it tends to select the first card displayed. If i mouse over far enough to the right then it will move from the first card. That seems significant although I do not know what to make of it

–

3 Answers

3

I found a solution very easy to implement for my Game, just add to the UI that you want in front of the particle a “Canvas” Conponent and check “Override sorting”, then select a sorting layer above the other selected in the main canvas of your scene.

Thanks Simon for the tips!

seriously dude! your answer helped me a lot! you need more upvotes! thank you!

–

Thank you for solving my problem as well! Been looking everywhere for this answer.

–

sir !! can you help me about putting particle in front of UI canvas ?? any image will be help !! thank you sir !!

–

@Andrew-Le : uuuhm that one is easy. basically you make the sorting order of particle higher than the Canvas sorting order open the "Renderer" tab in ParticleSystem . change the "Order in Layer" into higher number. if the particle has child, don't forget to change the order of the child as well

–

Also with Unity 2017.1.0f3, with a Screen Space - Camera Canvas, particles inside UI (behind a Raw Image and in front of another Raw Image) with matching Z order (not hierarchy) should work. In my case it didn't because Unity was batching stuff, thus it would only be one piece of UI rendered before or after the particle system. To break this and make it work I added canvases with Override sorting checked (even with the same sorting layer and index) on wrongly batched Raw Images.

–

I did answer this on the forums but can’t find my original answer.
In short the UI example asset on the Unity store shows a good example of how to mix particles and UI, you either need to put them on different layers or sandwich them between two screenspace camera / worldspace canvases.

I also found an old post discussing this very subject on the forums, check it out here:
http://forum.unity3d.com/threads/particles-within-the-new-gui.265215/
As far as I’m aware nothing has changed on this with U5

I was able to do that in the second way, using two different cameras for the UI layers. But i'm not able to accomplish the same putting them on different layers, what am I doing wrong?

–

I’ve just released UI Particles package for uGUI. UI Particles | GUI Tools | Unity Asset Store

It’s a simple drag&drop solution for particles in UI. Not required second camera, work with all type of canvases. Work with sorting inside canvas. And compatible with mobile.


not work your package in screen space camera

–

Im not sure If I understand this. This sounds like a similar solution to @skillbow 's solution. If I were to do this wouldn't i need to create a layer for each individual card? EDIT: Flashfram you are completly correct! I did not understand that the ray I was using was a 3D ray!

–