GUIContent.GUIContentstatic function GUIContent () : GUIContentDescriptionConstructor for GUIContent in all shapes and sizes Build an empty GUIContent. static function GUIContent (text : String) : GUIContentDescriptionBuild a GUIContent object containing only text. When using the GUI, you don't need to create GUIContents for simple text strings - these two lines of code are functionally equivalent:
JavaScript
function OnGUI () { using UnityEngine; import UnityEngine static function GUIContent (image : Texture) : GUIContentDescriptionBuild a GUIContent object containing only an image.
JavaScript
var icon : Texture; using UnityEngine; import UnityEngine static function GUIContent (text : String, image : Texture) : GUIContentDescriptionBuild a GUIContent object containing both text and an image.
JavaScript
var icon : Texture; using UnityEngine; import UnityEngine static function GUIContent (text : String, tooltip : String) : GUIContentDescriptionBuild a GUIContent containing some text. When the user hovers the mouse over it, the global GUI.tooltip is set to the tooltip.
JavaScript
function OnGUI () { using UnityEngine; import UnityEngine static function GUIContent (image : Texture, tooltip : String) : GUIContentDescriptionBuild a GUIContent containing an image. When the user hovers the mouse over it, the global GUI.tooltip is set to the tooltip. static function GUIContent (text : String, image : Texture, tooltip : String) : GUIContentDescriptionBuild a GUIContent that contains both text, an image and has a tooltip defined. When the user hovers the mouse over it, the global GUI.tooltip is set to the tooltip. static function GUIContent (src : GUIContent) : GUIContentDescriptionBuild a GUIContent as a copy of another GUIContent. |
