Author Topic: Simple scene transition  (Read 3831 times)

viqtor

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Simple scene transition
« on: May 14, 2014, 04:48:52 AM »
I want a simple animation between my scenes, but it seems really hard to do so with ngui. Can you give me a simple example?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Simple scene transition
« Reply #1 on: May 14, 2014, 06:54:26 AM »
What's an animation between scenes?

viqtor

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: Simple scene transition
« Reply #2 on: May 15, 2014, 03:18:22 AM »
I want something like this: http://cgcookie.com/unity/2014/01/27/scripting-loading-screen/.
So I made a prefab which has a UIRoot + UICamera and a panel with a simple load animation and with DoNotDestroyOnLoad flag on. But when I  load the next scene the existing UIRoot from there appears in front of my transition, even with a lower depth value.
Is there an easy solution to this? I found no answer in here http://www.tasharen.com/forum/index.php?topic=4170.0

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Simple scene transition
« Reply #3 on: May 15, 2014, 11:54:58 AM »
Each UIRoot generally has a camera underneath it, and camera's depth is what controls what's drawn on top of what. You will need to have a separate layer for your loading screen, and you will need to set the loading screen camera's depth to be higher than any other camera.

viqtor

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: Simple scene transition
« Reply #4 on: May 16, 2014, 02:57:02 AM »
Wow, thanks a lot, it worked  :)