simon56modder Posted June 21, 2015 Share Posted June 21, 2015 (edited) 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 June 21, 2015 by simon56modder Link to comment Share on other sites More sharing options...
sarbian Posted June 21, 2015 Share Posted June 21, 2015 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 More sharing options...
simon56modder Posted June 21, 2015 Author Share Posted June 21, 2015 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 FontThanks anyway Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now