Author Topic: NGUI on Mobile  (Read 54 times)

gearedgeek

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
NGUI on Mobile
« on: February 16, 2017, 11:12:25 PM »
I created a very basic NGUI menu for my mobile project. When testing the menu on my android device the menu appears for a second then closes/crashes.

gearedgeek

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: NGUI on Mobile
« Reply #1 on: February 16, 2017, 11:29:11 PM »
I have the menu scene and a game scene checked in the build menu. When I test on my android device the app goes straight to the game scene and not the menu scene.

But if I uncheck the game scene then the menu scene loads.

gearedgeek

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: NGUI on Mobile
« Reply #2 on: February 16, 2017, 11:38:07 PM »
Okay, I have figure the two issues as of right now. The first issue is with the menu scene crashing/closing. I did change the Scaling Style to "Constrained On Mobiles" as well checked both Content Width/height. You only need Content Height checked. Now the menu scene doesn't crash/close.

The second issue with the menu scene getting skipped and going straight to the game scene. I forgot about the Scene hierarchy in the Build Menu. Once I put the menu scene above the game scene then everything worked.

Sorry for posting these issues but at least if someone else runs into these issues this should help them.