User Tools

Site Tools


global:fonts

This is an old revision of the document!


Fonts

You can save different prefabs storing different font files to your project. This allows you to have custom fonts ready to be used in your project. Click in one of the font prefabs provided for an example. Currently, these examples use GUIText, but you can use other tools (like NGUI) to achieve your desired font effect. All GUI scripts are open source in UFE regardless of the version. If you are intending to build your own GUI scripts, you may choose to ignore this completely.

Font ID: Sets the font ID so it can be accessed by its id through code.

Font Prefab: The Game Object Prefab containing a GUIText


Code access:

UFE.config.fontOptions

Code example:

FontOptions fontOptions = UFE.GetFont(FontId.Font1);
GameObject guiTextGO = (GameObject)Instantiate(fontOptions.fontPrefab, Vector3.zero, Quaternion.identity);
guiTextGO.guiText.text = "Hello World!";

< Back to Global Editor

global/fonts.1386657779.txt.gz · Last modified: 2013/12/10 01:42 by Mistermind