1

I'm having a problem with my UI Elements. I am spawning in enemies who have health bars which stay on top of them. The problem is, that if those health bars move through the position of other UI Elements i have (let's say the "Main Menu Button") they get rendered on top of that Element, not behind it.

It looks like this

I managed to spawn the healthbars in a different canvas so they don't interfere with the button itself by blocking raycasts but i can't manage to layer them behind the button (which changes position during gameplay too).

Thanks in advance!

Yiasmat
  • 179
  • 1
  • 2
  • 9

1 Answers1

1

If you have more than one canvas you can control the order of them using the sort order property in the canvas component. Sort order screenshot

WaleedYaser
  • 605
  • 5
  • 9