Init(VisualElement, IUxmlAttributes, CreationContext)
Initialize a VisualElement instance with values from the UXML element attributes.
Read time 1 minuteLast updated 11 days ago
Definition
- Type: Method
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
public virtual void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc)
Parameters
The VisualElement to initialize.
A bag of name-value pairs, one for each attribute of the UXML element.
When the element is created as part of a template instance inserted in another document, this contains information about the insertion point.
Remarks
Override this function in your traits class to initialize your C# object with values read from the UXML document.