3
\$\begingroup\$

I'm developing a game with Unity3D. I found that particle effects would penetrate upper hierarchy UI. Can I show the effect when the UI's sibling index bigger then effect's and hide the effect when the UI's sibling index smaller then effect's?

Here is an illustration: enter image description here

\$\endgroup\$
7
  • \$\begingroup\$ Can you please share some more information because currently you question not clear may be image or you could define what does "UI's sibling index" means also how many particles systems are there. and please also explain a little more. \$\endgroup\$
    – Swati
    Sep 2, 2019 at 4:11
  • \$\begingroup\$ @Swati Ok.Suppose there are some game objects which have same parent object in hierarchy window.The top one's sibling index is 1, and the second is 2, the third is 3 and so on.You can realize it as upper or lower in hierawchy.I'm sorry for my poor english...Hope you can understand what i said. \$\endgroup\$ Sep 2, 2019 at 6:22
  • \$\begingroup\$ Ok. i got what do you mean from sibling ui indexes but i am sorry i steel confused about your question can you make a small video clip which will show the particles system and game hierarchy. \$\endgroup\$
    – Swati
    Sep 2, 2019 at 6:36
  • \$\begingroup\$ @Swati problem_picture ,the light edge effect on the brown block is my particle effect,you can see that the effect penetrated the drop down list though the drop down list was lower then the effect in hierawchy.But the result what i want is the drop down list would cover the particle effect.Have any solution to solve it? \$\endgroup\$ Sep 2, 2019 at 7:11
  • \$\begingroup\$ @Swati this is the glow(3)'s particle system \$\endgroup\$ Sep 2, 2019 at 7:17

1 Answer 1

3
\$\begingroup\$

To achieve this sort of effect:

  1. You need to change your caves "Render Mode" to "Screen space - Camera".enter image description here

You might have did it already as you are using particles but still to ensure you change the canvas "render mode".

  1. Now Change "Order in layer" to 0 for particles system.

enter image description here

  1. Add a component "Canvas" to the UI which you want to show up on the particles. In your case add "Canavs" to "drop_down_list_root".
  2. Now check the "Overriding sorting" and change "Order in layer" to some thing higher then particle's "Order layer" like:

enter image description here

And that's it. I hope this will resolve the issue you have.

\$\endgroup\$
2
  • \$\begingroup\$ Got it.Thank you very much.;) \$\endgroup\$ Sep 2, 2019 at 8:15
  • \$\begingroup\$ I am glad that this helped. \$\endgroup\$
    – Swati
    Sep 2, 2019 at 8:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .