UnityEngine.GUILayout.Button C# (CSharp) Method

Button() public static method

public static Button ( string text ) : bool
text string
return bool
		public static bool Button(string text) { return false; }

Usage Example

Example #1
0
    protected virtual void OnGUI()
    {
        if (!SetPivot && Selection.activeGameObject)
        {
            oldpos = Selection.activeGameObject.transform.position;
        }
        GUI.BeginHorizontal();
        SetPivot = (GUI.Toggle(SetPivot, "Pivot", GUI.ExpandWidth(false)) && Selection.activeGameObject != null);

        var old = SetCam;

        SetCam = (GUI.Toggle(SetCam && Camera.main != null, "Cam", GUI.ExpandHeight(false))); //camset

        if (SetCam != old && SetCam == false)
        {
            ResetCam();
        }
        if (GUI.Button("Apply"))
        {
            ApplyAll();
        }
        if (GUI.Button("Add"))
        {
            if (!instances.Contains(Selection.activeObject.name))
            {
                instances.Add(Selection.activeObject.name);
                SaveParams();
            }
        }
        GUI.EndHorizontal();
        DrawObjects();
        DrawSearch();
    }
All Usage Examples Of UnityEngine.GUILayout::Button