#How to get object in front of ui 2d

1 messages · Page 1 of 1 (latest)

turbid aurora
#

Sure I'll help

#

Drag the UI in front of the object

fiery barn
#

maybe related
https://www.youtube.com/watch?v=ptmum1FXiLE
there is also
https://stackoverflow.com/questions/73332594/convert-world-space-gameobject-position-to-screen-space-canvas-ui-position
but I'm not sure when this would not work as ui element positions often depend on the reference resolution of your canvas too. not sure if they are presented differently if you access the rectTransform position, that one might directly be in screen space or in canvas size relative space

✅ Get the Project files and Utilities at https://unitycodemonkey.com/video.php?v=ptmum1FXiLE
This is a Quick Tip for testing if the mouse is over the UI.

If you have any questions post them in the comments and I'll do my best to answer them.

🔔 Subscribe for more Unity Tutorials https://www.youtube.com/channel/UCFK6NCbuCIVzA6Yj1G_ZqCg?sub_confi...

▶ Play video