Author Topic: Camera depth and loading screen  (Read 5035 times)

kLy

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Camera depth and loading screen
« on: June 12, 2013, 09:18:39 AM »
Hey there

I have a loading screen in a separate scene that I bring in with LoadSceneAdditive in between level loading transitions.

Now the loading screen should cover all in-game elements for obvious reasons.

In that scene the GUI camera is set to a depth of 100. In the actual game the GUI camera is at depth 10.

However it seems like the GUI in the game is still being drawn on top of the splash screen even though Unity should be drawing the splash screen last according to the camera depth.

Is there something I'm missing here?

Thanks!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Camera depth and loading screen
« Reply #1 on: June 12, 2013, 01:51:57 PM »
No, nothing is missing. Higher depth camera is drawn last. Just make sure that the layers are set up correctly. The higher depth camera must only see the loading screen layer, and the loading screen UI must be on that layer.

kLy

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Camera depth and loading screen
« Reply #2 on: June 13, 2013, 09:21:17 AM »
You're totally right! It wasn't that the UI was showing through, it was that the splash camera was also rendering the game UI because it could see it! :) And since both cameras were at 0,0,0 the two draws lined up.

Thanks!