Author Topic: NGUI creating an empty UI Root at runtime  (Read 6324 times)

Meltdown

  • Jr. Member
  • **
  • Thank You
  • -Given: 10
  • -Receive: 0
  • Posts: 56
    • View Profile
NGUI creating an empty UI Root at runtime
« on: January 13, 2016, 12:39:58 AM »
I'm having this weird issue where NGUI is creating an empty UI Root at runtime sometimes.

I have no idea why this happens. But since this has started happening, my UI loses its layout in some PC Standalone builds, and everything goes to the center of the screen, as if the UI layout becomes corrupt.

Any idea what could cause this?

I'm using NGUI 3.9.4

EDIT : I also tried the latest, 3.9.6.d, still have the same issue.
« Last Edit: January 13, 2016, 12:49:33 AM by Meltdown »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI creating an empty UI Root at runtime
« Reply #1 on: January 13, 2016, 07:23:14 PM »
There is only one place in NGUI where a UIRoot can be created dynamically: line 817 of NGUITools.cs -- the CreateUI() function. Add a Debug.Log there to see where it's coming from. My guess is you've got a situation where a UI gets created before your existing UI gets loaded.