- Home /
Issues with GameObjects and GUI
I can't seem to get the GameObjects from going on top of the GUI I was wondering if anyone could help me out. This is what I see on top of the Pause menu:
As you can see, I am using the built in 4.6 GUI and it is 2D. I have tried everything i could think of. Changing sorting layer, changing order layer, changing actual z dimension. Any help would be greatly appreciated.
Thanks!
I have it set Screen Space - Camera. And I have not adjusted the opacity on the sprite.
I have just tried this and the GameObject is still on top of the GUI.
Answer by PAHeartBeat · Jul 27, 2015 at 10:48 AM
Hi @Madrig88
I have few qestion about your issue.
What is your canvas render mode ? (Screen Space - Overlay, Screen Spcae - Camera or world space) Did you adjust Opecity of you UI object (sprite / image componant)
May be was due to canvas rander mode.
Please check camera depth if you are using multiple camera like one for HUD and another for other objects (normaly I use two camear one for HUD with higher value depth and another for regular object uses in game which has lower value in depth)
If you using multiple camera use depth 0 for camera which see gameobject and depth 1 or 2 for camera which see for the HUD
Answer by Madrig88 · Jul 28, 2015 at 04:30 AM
I did assign a camera to render camera, and its still not working.
Answer by KokodokoGames · Aug 30, 2015 at 06:00 PM
Same problem here. Either the canvas displays as 10.000% the size of my game, or when I assign a camera to the canvas, the GUI appears behind the game objects - no matter what kind of z ordering is applied.
It seems that Unity2D is not working nicely with the GUI system at all.
I have now resorted to making all my GUI elements just simple game objects with mouse click events. This works much faster and it's easier to align the GUI with the rest of your game scene.