1
NGUI 3 Support / Re: Dynamic Fonts in Flash
« on: September 16, 2014, 02:08:53 PM »
Also, had this issue. You both pointed me in the right direction but I still had to fiddle around...
Here's how to fix it, more precisly:
1. In: NGUIText.cs, UILabel.cs & UIFont.cs
Change:
to:
2. In UILabel.cs
Change:
to
3. Lastly, in UIFont.cs
Change:
to
4. VoilĂ ! You may need to re-import the NGUI folder (from the project view) by right-clicking and selecting re-import
Here's how to fix it, more precisly:

1. In: NGUIText.cs, UILabel.cs & UIFont.cs
Change:
- #if !UNITY_3_5 && !UNITY_FLASH
- #define DYNAMIC_FONT
- #endif
- #if !UNITY_3_5
- #define DYNAMIC_FONT
- #endif
2. In UILabel.cs
Change:
- mFontUsage[mActiveTTF] = ++usage;
- mFontUsage[mActiveTTF] = usage+1;
3. Lastly, in UIFont.cs
Change:
- #if DYNAMIC_FONT
- if (a.isDynamic && b.isDynamic && a.dynamicFont.fontNames[0] == b.dynamicFont.fontNames[0]) return true;
- #endif
- #if DYNAMIC_FONT && !UNITY_FLASH
- if (a.isDynamic && b.isDynamic && a.dynamicFont.fontNames[0] == b.dynamicFont.fontNames[0]) return true;
- #endif
4. VoilĂ ! You may need to re-import the NGUI folder (from the project view) by right-clicking and selecting re-import
