GUILayout.EndArea Manual     Reference     Scripting  
Scripting > Runtime Classes > GUILayout
GUILayout.EndArea

static function EndArea () : void

Description

Close a GUILayout block started with BeginArea


Explained Area of the example.

JavaScript
function OnGUI () {
GUILayout.BeginArea (Rect (10,10,100,100));
GUILayout.Button ("Click me");
GUILayout.Button ("Or me");
// Ends the area started above
GUILayout.EndArea ();
}

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void OnGUI() {
GUILayout.BeginArea(new Rect(10, 10, 100, 100));
GUILayout.Button("Click me");
GUILayout.Button("Or me");
GUILayout.EndArea();
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def OnGUI():
GUILayout.BeginArea(Rect(10, 10, 100, 100))
GUILayout.Button('Click me')
GUILayout.Button('Or me')
GUILayout.EndArea()