Version: 2021.2
LanguageEnglish
  • C#

PanelSettings

class in UnityEngine.UIElements

/

Inherits from:ScriptableObject

/

Implemented in:UnityEngine.UIElementsModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Defines a Panel Settings asset that instantiates a panel at runtime. The panel makes it possible for Unity to display UXML-file based UI in the Game view.

Properties

clearColor Determines whether the color buffer is cleared before the panel is rendered.
clearDepthStencil Determines whether the depth/stencil buffer is cleared before the panel is rendered.
colorClearValue The color used to clear the color buffer.
depthClearValue The depth used to clear the depth/stencil buffer.
dynamicAtlasSettings Settings of the dynamic atlas.
fallbackDpi The DPI value that Unity uses when it cannot determine the screen DPI.
match Determines whether Unity uses width, height, or a mix of the two as a reference when it scales the panel area.
referenceDpi The DPI that the UI is designed for.
referenceResolution The resolution the UI is designed for.
scale A uniform scaling factor that Unity applies to elements in the panel before the panel transform.
scaleMode Determines how elements in the panel scale when the screen size changes.
screenMatchMode Specifies how to scale the panel area when the aspect ratio of the current resolution does not match the reference resolution.
sortingOrder When the Scene uses more than one panel, this value determines where this panel appears in the sorting order relative to other panels.
targetDisplay When the Scene uses more than one panel, this value determines where this panel appears in the sorting order relative to other panels.
targetTexture Specifies a Render Texture to render the panel's UI on.
textSettings Specifies a PanelTextSettings that will be used by every UI Document attached to the panel.
themeStyleSheet Specifies a style sheet that Unity applies to every UI Document attached to the panel.

Public Methods

SetScreenToPanelSpaceFunction Sets the function that handles the transformation from screen space to panel space. For overlay panels, this function returns the input value.

Inherited Members

Properties

hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameThe name of the object.

Public Methods

GetInstanceIDGets the instance ID of the object.
ToStringReturns the name of the object.

Static Methods

DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindObjectOfTypeReturns the first active loaded object of Type type.
FindObjectsOfTypeGets a list of all loaded objects of Type type.
InstantiateClones the object original and returns the clone.
CreateInstanceCreates an instance of a scriptable object.

Operators

boolDoes the object exist?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.

Messages

AwakeThis function is called when the ScriptableObject script is started.
OnDestroyThis function is called when the scriptable object will be destroyed.
OnDisableThis function is called when the scriptable object goes out of scope.
OnEnableThis function is called when the object is loaded.
OnValidateEditor-only function that Unity calls when the script is loaded or a value changes in the Inspector.
ResetReset to default values.