Hi, is it possible to assign a font from script? The font exists in my project. this is my code: Code (csharp): GameObject tf = new GameObject(); tf.transform.position = new Vector3(.5f, .5f, 0); GUIText guiText = tf.AddComponent(typeof(GUIText)) as GUIText; /* guiText.font = ... */ guiText.text = "test";
http://forum.unity3d.com/viewtopic.php?t=10175 Possibly the closest thing to what I believe you're after.
thank you. i thought it could be all done by the script - creating style and font and so on - but now i assigned the font to a GUIStyle in the editor and use it in my script: Code (csharp): ... public GUIStyle guiStyle = new GUIStyle(); ... guiText.font = guiStyle.font; ...