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

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

Thanks anyway :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...