Author Topic: New UILabel issues on Standalone  (Read 3814 times)

renanse

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 1
  • Posts: 14
    • View Profile
New UILabel issues on Standalone
« on: November 01, 2013, 10:42:24 AM »
After upgrading from 3.0.2 to 3.0.3f (and as of today, g) we are experiencing an issue when set to the standalone build target in Unity.

Some (not all) labels are incorrectly sized and 1000's of errors are appearing in the console:

Quote
Font size and style overrides are only supported for dynamic fonts.
UnityEngine.Font:GetCharacterInfo(Char, CharacterInfo&, Int32, FontStyle)
NGUIText:Print(String, Font, Int32, FontStyle, Color32, Boolean, TextAlignment, Int32, Boolean, BetterList`1, BetterList`1, BetterList`1) (at Assets/NGUI/Scripts/Internal/NGUIText.cs:439)
UILabel:OnFill(BetterList`1, BetterList`1, BetterList`1) (at Assets/NGUI/Scripts/UI/UILabel.cs:991)
UIWidget:UpdateGeometry(UIPanel, Boolean) (at Assets/NGUI/Scripts/Internal/UIWidget.cs:872)
UIPanel:UpdateWidgets() (at Assets/NGUI/Scripts/UI/UIPanel.cs:642)
UIPanel:LateUpdate() (at Assets/NGUI/Scripts/UI/UIPanel.cs:549)

Quote
Font size and style overrides are only supported for dynamic fonts.
UnityEngine.Font:GetCharacterInfo(Char, CharacterInfo&, Int32, FontStyle)
NGUIText:Print(String, Font, Int32, FontStyle, Color32, Boolean, TextAlignment, Int32, Boolean, BetterList`1, BetterList`1, BetterList`1) (at Assets/NGUI/Scripts/Internal/NGUIText.cs:486)
UILabel:OnFill(BetterList`1, BetterList`1, BetterList`1) (at Assets/NGUI/Scripts/UI/UILabel.cs:991)
UIWidget:UpdateGeometry(UIPanel, Boolean) (at Assets/NGUI/Scripts/Internal/UIWidget.cs:872)
UIPanel:UpdateWidgets() (at Assets/NGUI/Scripts/UI/UIPanel.cs:642)
UIPanel:LateUpdate() (at Assets/NGUI/Scripts/UI/UIPanel.cs:549)

etc.

We already went through the assets and prefabs and made sure everything is using dynamic fonts.

The problem goes away if we switch the Unity build target to Android or iOS.

renanse

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 1
  • Posts: 14
    • View Profile
Re: New UILabel issues on Standalone
« Reply #1 on: November 01, 2013, 10:49:31 AM »
And... I found the issue.  The problem was that one of the ttf fonts was set to Unicode instead of dynamic.  So though the uilabel was set to dynamic and it was linked to a ttf asset, the asset itself also needed to be set to dynamic.

Is that intended behavior?  If so, perhaps a check is needed somewhere?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: New UILabel issues on Standalone
« Reply #2 on: November 01, 2013, 11:22:36 AM »
A check, perhaps.

PoN

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 111
    • View Profile
Re: New UILabel issues on Standalone
« Reply #3 on: December 03, 2015, 05:51:17 AM »
Up!

Was fixed?

I use Unity3d 5.2.3 + NGUI 3.7.8. . Have the same error.
Worked on Doc&DogAge Of Fury 3D. Actually working on WarMach.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: New UILabel issues on Standalone
« Reply #4 on: December 09, 2015, 01:01:13 PM »
As a rule of thumb I ignore posts for old versions of NGUI as my response is always the same -- please update first.