Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sluice

Pages: [1]
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:  :D


1. In: NGUIText.cs, UILabel.cs & UIFont.cs
Change:
  1. #if !UNITY_3_5 && !UNITY_FLASH
  2. #define DYNAMIC_FONT
  3. #endif
to:
  1. #if !UNITY_3_5
  2. #define DYNAMIC_FONT
  3. #endif


2. In UILabel.cs
Change:
  1. mFontUsage[mActiveTTF] = ++usage;
to
  1. mFontUsage[mActiveTTF] = usage+1;


3. Lastly, in UIFont.cs
Change:
  1. #if DYNAMIC_FONT
  2.                 if (a.isDynamic && b.isDynamic && a.dynamicFont.fontNames[0] == b.dynamicFont.fontNames[0]) return true;
  3. #endif
to
  1. #if DYNAMIC_FONT && !UNITY_FLASH
  2.                 if (a.isDynamic && b.isDynamic && a.dynamicFont.fontNames[0] == b.dynamicFont.fontNames[0]) return true;
  3. #endif


4. VoilĂ ! You may need to re-import the NGUI folder (from the project view) by right-clicking and selecting re-import

Pages: [1]