UsoUIElements 0.1.0
Data Centric implimentation of Unity's UI Elements (UI Toolkit)
Loading...
Searching...
No Matches
GWG.UsoUIElements.CustomElements.UsoPieChartComponent Class Reference

A Unity MonoBehaviour component that manages a custom pie chart UI element. This component automatically creates and adds a UsoPieChart to the UIDocument's root visual element. More...

Inheritance diagram for GWG.UsoUIElements.CustomElements.UsoPieChartComponent:

Private Member Functions

void Start ()
 Unity's Start method called on the frame when a script is enabled just before any of the Update methods are called the first time. Creates a new UsoPieChart instance and adds it to the UIDocument's root visual element.

Private Attributes

UsoPieChart m_PieChart
 The pie chart visual element instance that is managed by this component.

Detailed Description

A Unity MonoBehaviour component that manages a custom pie chart UI element. This component automatically creates and adds a UsoPieChart to the UIDocument's root visual element.

This component requires a UIDocument component to be present on the same GameObject. The pie chart is created and added to the UI hierarchy during the Start phase.

Member Function Documentation

◆ Start()

void GWG.UsoUIElements.CustomElements.UsoPieChartComponent.Start ( )
private

Unity's Start method called on the frame when a script is enabled just before any of the Update methods are called the first time. Creates a new UsoPieChart instance and adds it to the UIDocument's root visual element.

This method assumes that a UIDocument component is present on the same GameObject (enforced by RequireComponent attribute). The pie chart is added as a child element to the root visual element of the UI document.

Member Data Documentation

◆ m_PieChart

UsoPieChart GWG.UsoUIElements.CustomElements.UsoPieChartComponent.m_PieChart
private

The pie chart visual element instance that is managed by this component.

This field is initialized in the Start method and represents the custom UI element that will be added to the UIDocument's root visual element.