GUIStyle
.fixedWidth
Manual
Reference
Scripting
Scripting
>
Runtime Classes
>
GUIStyle
GUIStyle
.fixedWidth
Menu
Overview
Runtime Classes
Attributes
Enumerations
Editor Classes
Enumerations
History
Index
GUIStyle
All Members
Variables
active
alignment
border
clipping
contentOffset
fixedHeight
fixedWidth
focused
font
fontSize
fontStyle
hover
imagePosition
lineHeight
margin
name
normal
onActive
onFocused
onHover
onNormal
overflow
padding
stretchHeight
stretchWidth
wordWrap
Constructors
GUIStyle
Functions
CalcHeight
CalcMinMaxWidth
CalcScreenSize
CalcSize
Draw
DrawCursor
DrawWithTextSelection
GetCursorPixelPosition
GetCursorStringIndex
Class Variables
none
Class Functions
operator GUIStyle
var
fixedWidth :
float
Description
If non-0, any GUI elements rendered with this style will have the width specified here.
JavaScripts
JavaScript
C#
Boo
// Prints the value of fixedWidth of customStyles[0]
function
OnGUI
() {
if
(
GUI.skin
.customStyles.Length > 0)
Debug.Log
(
GUI.skin
.customStyles[0].fixedWidth);
}
using UnityEngine;
using System.Collections;
public
class
example :
MonoBehaviour
{
void
OnGUI
() {
if
(
GUI.skin
.customStyles.Length > 0)
Debug.Log
(
GUI.skin
.customStyles[0].fixedWidth);
}
}
import
UnityEngine
import
System.Collections
class
example(
MonoBehaviour
):
def
OnGUI
():
if
GUI.skin
.customStyles.Length > 0:
Debug.Log
(
GUI.skin
.customStyles[0].fixedWidth)