Legacy Documentation: Version 5.0
Language: English
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

AreaScope

Namespace: UnityEngine

Switch to Manual

Description

Disposable helper class for managing BeginArea / EndArea.

BeginArea is called at construction, and EndArea is called when the instance is disposed. By default, any GUI controls made using GUILayout are placed in the top-left corner of the screen. If you want to place a series of automatically laid out controls in an arbitrary area, use GUILayout.BeginArea to define a new area for the automatic layouting system to use.

See Also: BeginArea, EndArea


Explained Area of the example.

no example available in JavaScript

Constructors

GUILayout.AreaScopeCreate a new AreaScope and begin the corresponding Area.