Author Topic: NGUI Font Maker not creating a Material  (Read 8145 times)

keithblu

  • Guest
NGUI Font Maker not creating a Material
« on: May 23, 2013, 02:13:16 PM »
I can't seem to get NGUI Font Maker to generate a material when I create a font.  I have followed along with a couple of video tutorials, and this seems to the the only discrepancy between what they get and what I get when I do the EXACT SAME STEPS word for word.  Have watched the Font Maker video on Tasharen (not the dynamic one), and zurgburg's video on it as well, and still can't come away with anything I am doing wrong somewhere along the way.  Could this be a version issue?   Could it be a problem with the .txt generated by BMfont?  Am I just stupid/blind?

I have scoured the internet for the solution to this, and I honestly see that nobody seems to be having this problem.  Since no searches I did revealed a forum thread with this issue addressed in it, I am going out on a limb to just create this after only checking about 10 pages of threads here (instead of all 130+ pages).  Sorry if this has already been addressed, I would appreciate being directed to that thread if so.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI Font Maker not creating a Material
« Reply #1 on: May 23, 2013, 09:15:07 PM »
When you create a non-dynamic font, if you specify an atlas, then the font will go into the atlas, and there won't be a separate material.

keithblu

  • Guest
Re: NGUI Font Maker not creating a Material
« Reply #2 on: May 26, 2013, 02:07:57 PM »
Unity seems to expect it, the console returns "Attempting to render an invalid font" and I see nothing in my labels.  Since I followed example tutorials, I'm relatively limited in the way I can ask this question, because everything I can think of to ask they covered, and I did.  Is there any specific flaw in the way a font will work if included in my gui atlas?  Keep in mind, I've already tried altering the depth and the z transform of the label to no avail.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI Font Maker not creating a Material
« Reply #3 on: May 26, 2013, 07:25:31 PM »
You likely forgot to select the glyphs that will go into the font. It's easy to miss when creating a font using BMFont. Open the FNT file -- if it's not full of data, then you forgot.

keithblu

  • Guest
Re: NGUI Font Maker not creating a Material
« Reply #4 on: May 27, 2013, 11:19:35 AM »
I selected the glyphs.  The texture appears on the atlas and everything.  It just generates errors when Unity tries to use it.  I used the .tga format(which is used in the tutorial on this site), and the .fnt file is crammed with data for the glyphs.  I literally paused the video each time a new step came up just to be sure I did it.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI Font Maker not creating a Material
« Reply #5 on: May 27, 2013, 12:02:38 PM »
I just tried it on my end and it worked just fine.

0. New scene.
1. Opened BMFont, clicked "Latin + Latin Supplement", exported as "test".
2. Opened the Font Maker, set the Font Data, Texture, chose the target atlas, and hit Create.
3. Hit Alt+Shift+L creating a label. It automatically used the new font.