Author Topic: Unity 5 and labels  (Read 6562 times)

Jeff

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Unity 5 and labels
« on: March 03, 2015, 04:48:03 PM »
Hello hello. Just upgraded to Unity 5. Seems like there's a problem with labels. Each individual character on a label is rotated or flipped. I've included a screenshot to demonstrate.

Those characters used to spell words!

 ;D

Any ideas?

Thanks!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unity 5 and labels
« Reply #1 on: March 03, 2015, 05:45:44 PM »
What version of NGUI are you using? You need to be on the latest.

Jeff

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Unity 5 and labels
« Reply #2 on: March 03, 2015, 07:59:16 PM »
I'm up to date: 3.8.0

Labels will also disappear in the static preview window, and only come back when play is hit. I've tried changing a label during run-time and each character is flipped as I type. Here's another shot, the text should (and did in 4.6.3) read "Choose a World!"

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unity 5 and labels
« Reply #3 on: March 05, 2015, 09:48:32 PM »
Sounds like Unity 5 reverted one of their changes then. I will have a look at it when I return from PAX.

Jeff

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Unity 5 and labels
« Reply #4 on: March 07, 2015, 10:49:17 AM »
thanks!

hamode23

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Unity 5 and labels
« Reply #5 on: March 10, 2015, 11:59:53 PM »
Hi,

We have exactly the same problem with the latest NGUI version.
We are very close to production !  :o

hamode23

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Unity 5 and labels
« Reply #6 on: March 11, 2015, 11:30:46 AM »
i'm totally stuck due to this issue.  :(

1. is there a WA I can use until a fix will be available hopefully soon?

2. is there a way to use Unity UI Font with NGUI or as a child of NGUI objects?

please note that i'm using RTL fonts which are not supported by NGUI Bitmap fonts (at least based on test that I have did).



ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unity 5 and labels
« Reply #7 on: March 12, 2015, 07:57:39 PM »
I had a look at this... everything works fine on my end. Made a new scene, added a label, chose a dynamic font... everything prints fine in NGUI 3.8.0 / Unity 5.0.0f4. Need more details, such as which font you're using.

Jeff

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Unity 5 and labels
« Reply #8 on: March 13, 2015, 05:39:28 PM »
It happens with all fonts, but I'm using BradyBunch.

It seems it has something to do with the project; When I create a new scene within the project and make a new label, the characters are rotated. When I create an entirely new project and try the same thing, the dynamic font works fine. I thought it might have had something to do with Unity upgrading the project from 4 to 5, but converting a simple scene with one label from 4 to 5 works fine and the label reads as it should.

Jeff

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Unity 5 and labels
« Reply #9 on: March 15, 2015, 10:00:23 PM »
BOOM!!! I've fixed it! To anyone else having this issue, here are the steps I took to resolve it... I hope you have a pre-Unity 5 upgrade back up!

1. Open project in Unity 4.6
2a. Delete NGUI folder as well as NGUI folder in "Plugins" if you made one
2b. Create a prefab of the NGUI instance in your scene (this step may be unnecessary)
3. Save Scene and Project
4. Open project in Unity 5 and let upgrade commence
5. Re-download/import NGUI from asset store and move correct folders to "Plugins" if needed
6. Close Unity and re-open project

at this point when I re-opened the project I got errors telling me that scripts and an API I'm using were outdated and needed to be upgraded. I had to close, reopen, and upgrade API twice before NGUI showed in the toolbar

7. Drag NGUI prefab back into hierarchy. This step seems unnecessary as subsequent scenes without the prefab rendered text correctly. It was a precaution I took because the upgrade process takes a bit of time and I didn't want to have to redo the whole thing.

8. Pour a glass of scotch because two years of hard work isn't completely borked.
step 8 is option but highly advised

The issue of text disappearing in the scene view remains, but compared to the original problem, it's negligible.

Hope this helps anyone with similar problems!
« Last Edit: March 15, 2015, 10:13:43 PM by Jeff »

Jeff

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Unity 5 and labels
« Reply #10 on: March 15, 2015, 10:10:13 PM »
AHAHAHAHAH!!! I've just made it even easier to solve! (sorry just really happy!)

In your upgraded Unity 5 project, just delete the NGUI folder as well as the NGUI folder in "Plugins". Re-download and import, move the correct directories to "Plugins" and everything is right as rain.