GUIStyle.fixedWidth Manual     Reference     Scripting  
Scripting > Runtime Classes > GUIStyle
GUIStyle.fixedWidth

var fixedWidth : float

Description

If non-0, any GUI elements rendered with this style will have the width specified here.

JavaScript
// 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)