Page 1 of 1

Problem with Layer Order

Posted: Sun Jan 27, 2019 2:57 pm
by allisonrose
Hey! This may be a really dumb question, so forgive me for overlooking the obvious solution. I'm still learning Unity as I go along.


I'm having issues with game objects in my scene not showing up when the Background layer is active. (I'm using the VN framework)

I have two objects on my stage - One character model (using Live2d) and another random sprite just for testing to make sure this issue isn't specific to the live2d prefab object.
Image

When I test the game with the background layer turned on, it covers up the game objects completely. I have attempted to try out different sort layers (UI, Default, even a custom sort layer)and it doesn't seem to make a difference. I have also tried putting my game objects IN the background canvas, but they don't show up at all then.
Image

This is an image of a test run with the background image turned off. Everything shows up fine. But ideally, I'd like to use the background field, so this creates a bit of an issue.

Image


Any ideas on what I'm missing? Thanks in advance!!

Re: Problem with Layer Order

Posted: Sun Jan 27, 2019 3:46 pm
by Tony Li
Hi!

The Background Canvas's Render Mode is set to Screen Space - Overlay. This makes it draw on top of any non-UI elements in the scene, such as SpriteRenderers.

Change the Background Canvas's Render Mode to Screen Space - Camera. Assign the scene's camera. Make sure your camera is set to Orthographic. The Canvas's Plane Distance is 100, which should place it well behind any sprites you put in the scene.

Re: Problem with Layer Order

Posted: Mon Jan 28, 2019 2:39 pm
by allisonrose
Great!!
Thanks once again (and probably a million more times in the future) for being so patient and helpful!

Re: Problem with Layer Order

Posted: Mon Jan 28, 2019 3:06 pm
by Tony Li
Always happy to help!