Get a named GUIStyle.
private var b : boolean;
function OnGUI() {
b = GUILayout.Toggle(b, "A toggle button", GUI.skin.GetStyle("Button"));
}
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
private bool b;
void OnGUI() {
b = GUILayout.Toggle(b, "A toggle button", GUI.skin.GetStyle("Button"));
}
}
import UnityEngine
import System.Collections
class example(MonoBehaviour):
private b as bool
def OnGUI():
b = GUILayout.Toggle(b, 'A toggle button', GUI.skin.GetStyle('Button'))
And the script attached to this editor script: // SimpleExampleScript.js
// This is not an editor script.
var armor : int = 75;
var damage : int = 25;