Author Topic: Is NGUI screwing up Unity's Editor GUI? (It's not)  (Read 9038 times)

calbar

  • Guest
Is NGUI screwing up Unity's Editor GUI? (It's not)
« on: October 15, 2013, 01:35:56 PM »
Something has been happening lately that I can't guarantee is caused by NGUI, but importing and using NGUI has been the only major change to my project recently.

Seemingly at random, my editor font will change as well as the Inspector box colors. Here are some screenshots for comparison:


This is how the editor looks normally.


Note the increase in font size and the Inspector box colors.

It tends to coincide with another weird behavior, where the Scene and Game View will stop rendering NGUI objects. Continuing to interact with the editor will eventually kick-start them to render again, but I'm not sure exactly what triggers this. This latest instance happened exactly like that: my NGUI objects were not rendering, I clicked something random and they switched to rendering again, but in the same instant the editor GUI switched to the buggy state pictured.

As far as I can tell, this buggy state persists until you restart Unity, so it's not a dealbreaker, but has anyone else experienced this or have any ideas?

Thanks!
« Last Edit: October 26, 2013, 10:54:37 AM by calbar »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Is NGUI screwing up Unity's Editor GUI?
« Reply #1 on: October 15, 2013, 02:09:38 PM »
I have never seen this before, or heard of anyone having a similar issue. NGUI doesn't modify editor styles at all.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Is NGUI screwing up Unity's Editor GUI?
« Reply #2 on: October 15, 2013, 02:14:23 PM »
I have experienced a similar issue on an older project with NGUI. I think it's if you have something else messing with the Transform inspector, it may be interfering with NGUI's setup. I never got to the bottom of it though.

rorakin3

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: Is NGUI screwing up Unity's Editor GUI?
« Reply #3 on: October 15, 2013, 07:31:48 PM »
I get that quite often too, I never suspected it was because of NGUI, maybe it is, maybe it isn't

mishaps

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 65
    • View Profile
Re: Is NGUI screwing up Unity's Editor GUI?
« Reply #4 on: October 16, 2013, 01:47:55 AM »
I get this problem every time I update ngui too. To fix it disable the OnGUI bit right at the bottom of UICamera.cs script.

Thread from ages ago:
http://www.tasharen.com/forum/index.php?topic=3491.0

EDIT using osx with unity pro and iOS pro if that helps

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Is NGUI screwing up Unity's Editor GUI?
« Reply #5 on: October 16, 2013, 02:15:08 AM »
Have you tried simply exiting out if (!Application.isPlaying)?

calbar

  • Guest
Re: Is NGUI screwing up Unity's Editor GUI?
« Reply #6 on: October 19, 2013, 06:58:22 PM »
Hmm... alrighty. Like a said, not a dealbreaker and it's a rare-ish occurrence. If I ever glean any more useful information I'll let ya know.

Yukichu

  • Full Member
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 8
  • Posts: 101
    • View Profile
Re: Is NGUI screwing up Unity's Editor GUI?
« Reply #7 on: October 21, 2013, 09:28:30 AM »
This issue has been documented all over the place, it's not NGUI specific.

http://answers.unity3d.com/questions/327074/editor-font-changes-randomly.html

http://answers.unity3d.com/questions/403308/editor-font-changes-when-pressing-ctrl-p.html

Here was the best response that seems to work for fixing this without actually restarting the Unity editor:

"Simple Steps
1) select and switch to your own layout even if you are currently at your own layout already. (may use default layouts for trial)
2) unselect maximize screen for your game view
3) Cmd + Play or play for scene and return"

calbar

  • Guest
Re: Is NGUI screwing up Unity's Editor GUI?
« Reply #8 on: October 26, 2013, 10:54:03 AM »
Ah, you are correct, sir. Sorry, that's my bad for making the assumption that it couldn't possibly be Unity core. Silly me :P. Thanks for your help guys.

Haim

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 29
    • View Profile
Re: Is NGUI screwing up Unity's Editor GUI? (It's not)
« Reply #9 on: October 26, 2013, 11:10:08 AM »
i have this too from time to time. i just play and stop the scene again and every thing back to normal.