Author Topic: Not seamless NGUI using Application.LoadLevelAsync  (Read 7543 times)

konsnos

  • Newbie
  • *
  • Thank You
  • -Given: 8
  • -Receive: 0
  • Posts: 26
    • View Profile
Not seamless NGUI using Application.LoadLevelAsync
« on: November 28, 2014, 04:20:14 PM »
Hello again,

I'm having a strange problem. I have a MainMenu screen, which I set the UIRoot to be Constrained (Width 1920, Height 1080, both Fit), a Loading screen with the same parameters, and my Gameplay screen which is set to Flexible.

The transition between MainMenu and Loading screens is seamless. However when I LoadLevelAsync from Loading, which I have set to DontDestroyOnLoad, to Gameplay screen, I can see my Gameplay UI correctly and when I manually destroy Loading screen, it then repositions itself to somewhere in the middle.

I have tried to fix it but to no avail :( Am I missing something? Any help is appreciated. I want to keep the Scaling Style Flexible for Gameplay screen.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Not seamless NGUI using Application.LoadLevelAsync
« Reply #1 on: November 30, 2014, 05:22:00 AM »
If you have multiple UIs in the same scene, you must ensure that they use different layers, otherwise one UI's camera will interfere with another's.

konsnos

  • Newbie
  • *
  • Thank You
  • -Given: 8
  • -Receive: 0
  • Posts: 26
    • View Profile
Re: Not seamless NGUI using Application.LoadLevelAsync
« Reply #2 on: December 01, 2014, 02:07:23 AM »
If you have multiple UIs in the same scene, you must ensure that they use different layers, otherwise one UI's camera will interfere with another's.
You mean Unity's Layers? Not depth?

Tried it, didn't help. Previous UI was Default layer, the Gameplay UI has Layer GUI. It had the same problem.
« Last Edit: December 01, 2014, 07:10:30 AM by konsnos »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Not seamless NGUI using Application.LoadLevelAsync
« Reply #3 on: December 02, 2014, 11:21:21 AM »
Yes, different unity layers. You need to make sure that you change the layers on the camera culling masks as well.

konsnos

  • Newbie
  • *
  • Thank You
  • -Given: 8
  • -Receive: 0
  • Posts: 26
    • View Profile
Re: Not seamless NGUI using Application.LoadLevelAsync
« Reply #4 on: December 05, 2014, 03:20:32 AM »
That did the job. Thanks!