Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

VisualElementReference<T0>

class in UnityEngine.UIElements

/

Inherits from:UIElements.VisualElementReference

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

Represents a strongly-typed reference to a VisualElement in a PanelRenderer.

Constructors

Constructor Description
VisualElementReference_1 Creates a new empty VisualElementReference.

Public Methods

Method Description
RegisterReferenceResolvedCallback Registers a callback for when the reference is resolved from the document. When you register a callback, if the reference is already resolved, the callback is immediately invoked.
RegisterReferenceUnloadedCallback Registers a callback for when the referenced object is unloaded. This occurs when the document is destroyed, such as when a live reload occurs after the VisualTreeAsset changes. At this point, all references are invalid and should be cleared.
UnregisterReferenceResolvedCallback Unregisters a callback for when the reference is resolved from the document.
UnregisterReferenceUnloadedCallback Unregisters a callback for when the referenced object is unloaded.

Inherited Members

Properties

PropertyDescription
authoringPath The path to the referenced element. SetReference
panelRenderer The provider used to resolve the reference. SetReference

Public Methods

MethodDescription
Equals Indicates whether the current object is equal to another element reference.
RegisterReferenceResolvedCallback Registers a callback for when the reference is resolved from the document. When you register a callback, if the reference is already resolved, the callback is immediately invoked.
RegisterReferenceUnloadedCallback Registers a callback for when the referenced object is unloaded. This occurs when the document is destroyed, such as when a live reload occurs after the VisualTreeAsset changes. At this point, all references are invalid and should be cleared.
SetReference Sets the reference to point to the given document and path.
UnregisterReferenceResolvedCallback Unregisters a callback for when the reference is resolved from the document.
UnregisterReferenceUnloadedCallback Unregisters a callback for when the referenced object is unloaded.