Version: Unity 6 Preview (6000.0)
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

bindingLogLevel Sets the log level for bindings in panels using this PanelSettings asset.
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.
forceGammaRendering Forces the UI shader to output colors in the gamma color space.
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.
referenceSpritePixelsPerUnit Sprites have a Pixels Per Unit value that controls the pixel density of the sprite. For sprites that have the same Pixels Per Unit value as the Reference Pixels Per Unit value in the PanelSettings asset, the pixel density will be one to one.
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 Set the display intended for the panel.
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.
vertexBudget The expected number of vertices that will be used by this panel.

Public Methods

SetPanelChangeReceiver Sets a custom IPanelChangeReceiver in the panelChangeReceiver setter to receive every change event. This method is available only in development builds and the editor, as it is a debug feature to go along the profiling of an application.
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.
FindAnyObjectByTypeRetrieves any active loaded object of Type type.
FindFirstObjectByTypeRetrieves the first active loaded object of Type type.
FindObjectsByTypeRetrieves a list of all loaded objects of Type type.
InstantiateClones the object original and returns the clone.
InstantiateAsyncCaptures a snapshot of the original object (that must be related to some GameObject) and returns the AsyncInstantiateOperation.
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

AwakeCalled when an instance of ScriptableObject is created.
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.