I’m having an issue with sorting group and getting items to stay in place. I’ve tried everything to get the sorting group to appear above my background. Specifically with UI sorting and sprite sorting. I;'ve tried making both images as a ui image and the background appears above the sprite( with the sprite being a UI Image). At one point I was able to get the sprite to appear above the UI image; but, for some reason I accidentally deleted my main camera and broke everything.
Which UI pipeline are you using, uGUI or UI Toolkit?
Currently using the universal render pipeline
Not asking the rendering pipeline, asking which UI framework you’re using.
Again: uGUI, or UI Toolkit? I’m assuming uGUI but you haven’t specified.
trying to position gameplay items with UI is asking for constant headache.
first why do you need them to be mixed with the UI?
second the UI has this fluid concept if you are not careful where it will adapt to the screen, change position, stuff like that. Like a webpage where if you scale the page stuff will change position. So if you don’t plan carefully they will move out of position AND most of the time you have to spend a lot of time to put them back where you wanted THEN they will move out again.
use sorting, you can use those sorting layers to group stuff. so the hierarchy is sorting layers beat other sorting layers then inside a sorting layer the index is important
also use the 2D camera the one that doesn’t care about the depth. (created by default if you create a 2D scene with camera)
New to this I am assuming uGUI as well. How can I find that?
If your UI is game objects in a scene, and you’re using components to design your UI, then it’s uGUI.
You probably want to set the overlay mode of your canvas to camera space, and set a distance from the camera that will position the UI physically behind your 2d game objects.
Ahh I see so, looking into my game I am using UGUI. However, the odd this is that i am using a screen space overlay; but this is getting this issue. The thing is that I have a parent Game Object and the ui images that reflect from the camera derive from it. Should I adjust the order?
Making a life simulator and yes, this is a major issue. I wanted the background that will change from various cycles of the day. I am attaching the background to the camera as an overlay.
Screen space overlay will always draw the UI over anything in the scene.
Hence the suggestion to use camera space overlay, so you can set a distance from the camera that it is drawn.
Ahh, I see okay i will make some changes to my project. Last question What should I type in the Unity manual to find more about the render modes in unity for the ui? This is a new challenge for me and i need some good leads.
The uGUI framework is a package (Unity UI in the package manager). Packages have their docs separate to the main manual. There should be a link to the docs in its entry in the package manager.
Here’s a link to it, too: Unity UI: Unity User Interface | Unity UI | 3.0.0-exp.4
Thank you for the help!

