I have a canvas and eventsystem GameObjects that cross all scenes with DontDestroyOnLoad. On top of this each Scene has it’s own canvas.
The issue I’m having is that the individual scene canvases seem to work perfectly, but the canvas that crosses all scenes doesn’t show.
Looking in the Hierarchy I can see that both canvases are active, but I think I’m missing something about zIndex or localPosition. Is there something I need to change so that both canvases show?
I had a similar issue using Screen Space - Overlay and multiple canvases when bringing ‘popup’ windows into the next scene ie DontDestroyOnLoad. The Z order was different from the first scene. Not sure if this is a bug or not.
I found that I needed to use Screen Space - Camera and specifically define the sorting layers.
Thanks dakka.
I tried that, but I’m still getting the Z fighting problems. I created sorting layers too, but same issue. I can see both canvases in the SceneView, but not in GameView. Is there something else I’m missing?
I got caught, when you keep a canvas across scenes ie DontDestroyOnLoad the camera is missing unless it is part of the hierarchy. Also the sorting layers work like tags, you need to name it, then apply it to the object.
Having got it working (sort of), it seems a bit buggy/a lot of extra hassle.
I’m reverting to my original method of a single canvas per scene, with copies of the same window in each. I don’t feel it’s the right way, but it’s certainly the least buggy.