Author Topic: NGUI is not keeping consistent appearance  (Read 2876 times)

Snake377

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
  • Let there be Game
    • View Profile
NGUI is not keeping consistent appearance
« on: September 25, 2014, 11:38:45 AM »
Hello there!

I am using the latest version of NGUI to develop applications within the latest stable release of Unity3D. I am using NGUI in conjunction with the latest version of Playmaker, as programming is not my strength.

The issue I have ran into and have been struggling to resolve for the past few months is a tricky one. Essentially I will create a project in Unity with all my NGUI material set up. Within the GAME window in Unity everything looks just great and works perfectly. However after I export the project as an APK for example, my lovely NGUI setup becomes ruined in my build. The labels will either become blown up to huge sizes or microscopic sizes, and buttons and sprites will be positioned incorrectly or off of the screen. Basically what I see in the Unity GAME window looks perfect, and my exported projects look terrible :(

  • I have verified that the resolution for my project in the game preview window is set correctly.
    I have used Anchors>Unified for my labels and other items within NGUI.
    I have checked the layer depth of items within NGUI.

I am not creating anything overly complex in NGUI, it is just a simple 2D GUi. No 3d work or anything like that. I have watched many youtube tutorials and read many forums in search of why this is happening to me, but I am at the end of my wits trying to figure this out. NGUI is looking superb in the Unity Game preview window itself, but when I export to mobile devices it loses that magic. I am begging that someone help me with this, as it is my only hope for great looking GUI within Unity.

I truly appreciate any suggestions or guidance on this matter, anyone who can help me resolve this issue will be my hero!

Thank you for your time!
-Z

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: NGUI is not keeping consistent appearance
« Reply #1 on: September 25, 2014, 02:20:33 PM »
Are you using UIRoot on FixedSize?  ???

Snake377

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
  • Let there be Game
    • View Profile
Re: NGUI is not keeping consistent appearance
« Reply #2 on: September 25, 2014, 06:57:15 PM »
Thank you for your response! I am not seeing an option for FixedSize, are we talking about the scaling style under UIRoot in the inspector window? Currently it is set to Flexible. Here is a screenshot:

Snake377

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
  • Let there be Game
    • View Profile
(SOLVED) NGUI is not keeping consistent appearance
« Reply #3 on: September 25, 2014, 07:39:25 PM »
You know what jeldrez, I think you sir, are a genius8) I set it to Constrained and entered the dimensions of my play window. I also checked the Fit boxes.

After building the project it now looks the same in both the game window and other external devices. This was the solution that worked!

Thank you jeldrez for taking the time to point me in the right direction!

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: NGUI is not keeping consistent appearance
« Reply #4 on: September 26, 2014, 07:26:33 AM »
Your welcome!