Author Topic: Problem with the UIPanels at the beginning of my game  (Read 2445 times)

jcmartinac

  • Guest
Problem with the UIPanels at the beginning of my game
« on: May 30, 2013, 07:19:21 AM »
Hello!
I am developing a game for web and mobile devices with NGUI and I have a weird bug. It only happens in webplayers running in Mac computers. The problem is next: when the game start, depending on a query it should load a specific panel, but the first time the game is loaded it show nothing but grey (the camera background color) and if I reload the page it works fine. I have debugged the enable function of UIPanel and in both cases print the same messages, the panels are enabled but in the first load do not show any and in the second attempt the panel is correct (sprites, labels...).

The query debug indicates that is working well and music is playing as well... so I think there is something wrong with ngui but I can not figure out... some help? any similar issue?

thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with the UIPanels at the beginning of my game
« Reply #1 on: May 30, 2013, 03:06:41 PM »
How do you enable your panel?

jcmartinac

  • Guest
Re: Problem with the UIPanels at the beginning of my game
« Reply #2 on: June 03, 2013, 04:27:51 AM »
this way

NGUITools.SetActive(MainMenu,true);
NGUITools.SetActive(Register,false);

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with the UIPanels at the beginning of my game
« Reply #3 on: June 03, 2013, 09:34:00 AM »
Yeah that should be just fine... so not sure what's the issue in your case. Check your panels, selecting them should give you a list of what they're drawing. And you can always enable debugging on them to be able to select the final meshes.