TryGetReference
Retrieves the VisualElement associated with the specified authoring ID path.
Read time 1 minuteLast updated 9 days ago
Definition
- Type: Method
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
TryGetReference<T>(AuthoringIdPath, T)
Retrieves the VisualElement associated with the specified authoring ID path.
public bool TryGetReference<T>(AuthoringIdPath idPath, out T element) where T : VisualElement
Parameters
The authoring ID path to search for.
Returns
Type | Description |
|---|---|
| bool | |
TryGetReference<T>(DocumentNode, AuthoringIdPath, T)
Retrieves the VisualElement associated with the specified authoring Id path.
public bool TryGetReference<T>(VisualElementAssetReferenceTable.DocumentNode documentNode, AuthoringIdPath idPath, out T element) where T : VisualElement
Parameters
The document node to search within. This allows searching for a path that is not based on the root.
The authoring ID path to search for.
Returns
Type | Description |
|---|---|
| bool | |