var stretchWidth : bool
Description
Can GUI elements of this style be stretched horizontally for better layouting?
function OnGUI() {
if(
GUI.skin.customStyles.Length > 0)
GUI.skin.customStyles[0].stretchWidth = true;
}
using UnityEngine;
using System.Collections;
public class example :
MonoBehaviour {
void OnGUI() {
if (
GUI.skin.customStyles.Length > 0)
GUI.skin.customStyles[0].stretchWidth = true;
}
}
import UnityEngine
import System.Collections
class example(
MonoBehaviour):
def
OnGUI():
if GUI.skin.customStyles.Length > 0:
GUI.skin.customStyles[0].stretchWidth = true