Author Topic: Problems with UILabel  (Read 5019 times)

greyhoundgames

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 39
    • View Profile
Problems with UILabel
« on: September 14, 2015, 02:58:59 PM »
I recently hit the following bug(which is very confusing because I am pretty sure I have sucefully generated fonts since I updated to Unity 5)

http://www.tasharen.com/forum/index.php?topic=12001.0

Ok so I took the route of using a tool to generate fnt files(the web based one linked) and made my fnt file. I went into the atlas make and selected the import option. Selected fnt, selected texture, go. Everything seemed fine. However labels set to use this draw nothing. I also noticed that the prefab that was created was only 1k and basically was empty. This seemed wierd.

Thoughts?

[Update] I tried the 32 bit version of unity and it still does not work. Here is the error it produced(which is not the same error). I downloaded a fresh copy of NGUI into a new project just to be sure it wasnt due to having installed a 64bit plugin

Failed to load 'Assets/NGUI/Editor/FreeType64.dll', expected 32 bit architecture (IMAGE_FILE_MACHINE_I386), but was IMAGE_FILE_MACHINE_AMD64. You must recompile your plugin for 32 bit architecture. You have the following:
#if UNITY_4_3 || UNITY_4_5 || UNITY_4_6
               string filename = (Application.platform == RuntimePlatform.WindowsEditor) ? "FreeType.dll" : "FreeType.dylib";
#else
               string filename = (Application.platform == RuntimePlatform.WindowsEditor) ? "FreeType64.dll" : "FreeType64.dylib";
#endif
However there is a 32 bit unity 5. Changing this did not fix my problem, even with a restart.

[Update2]
Going back to Unity4.6, it still does not work.
On windows for either unity 5 or 4 when you drag the ttf font into the generate font field it does nothing, on mac it spits up the error about easyfont
On both for using import font there are no errors but labels produce nothing and the prefab is super tiny.
« Last Edit: September 14, 2015, 04:31:24 PM by greyhoundgames »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problems with UILabel
« Reply #1 on: September 20, 2015, 01:29:34 AM »
There is no need to drag a font anywhere, just click the "Source" button and choose the font -- assuming you are talking about the Font Maker tool that comes with NGUI.

I can't comment on the web based tool as I haven't used it, but with the BMFont tool you had to actually select the glyphs you wanted to export with the font, otherwise the exported font would be blank.

swogdog

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Problems with UILabel
« Reply #2 on: February 09, 2016, 08:23:21 PM »
I'm having the same error.  I'm using Unity 5.3.2f1 32-bit and a fresh install of the latest NGUI.  It seems that Unity won't even display the Font Maker Panel correctly because of this:

Failed to load 'Assets/NGUI/Editor/FreeType64.dll', expected 32 bit architecture (IMAGE_FILE_MACHINE_I386), but was IMAGE_FILE_MACHINE_AMD64. You must recompile your plugin for 32 bit architecture.
UIFontMaker:OnGUI() (at Assets/NGUI/Scripts/Editor/UIFontMaker.cs:562)
UIFontMaker:OnGUI() (at Assets/NGUI/Scripts/Editor/UIFontMaker.cs:221)
UnityEditor.DockArea:OnGUI()

I have to use 32-bit because I have other plugins that aren't 64-bit ready on windows.

It's not a huge deal though, I just created my fonts using the 64-bit Unity install and then went back to my 32-bit version to continue development.  Just thought I'd chime in on the issue.