Jump to content

[IMPOSSIBLE To DO] Load Font from a GameData subfolder


Recommended Posts

Hi,

I want to load a .ttf font that is stored in a GameData sub-folder. Then I want to apply it to a TextMesh like this :


TextMesh mesh; // load the target TextMesh...
Font fnt; [B]// LOAD THE FONT[/B]
mesh.font = fnt;

How can I load this font file ?

Edited by simon56modder
Link to comment
Share on other sites

AFAIK you can't load a truetype font at runtime. At best you could use the default Arial font that unity include in all build :

Font fnt = Resources.GetBuiltinResource(typeof(Font), "Arial.ttf") as Font

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...