Table of Contents

Fonts

(Deprecated after 1.6 update. See Global Options -> GUI Options)

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


How to create a new font

Inside .\UFE\GUI\Fonts\ you will find 5 examples of Font folders. Each folder contains 5 different group of font files. In order to create these files follow these procedures:


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