𧩠Custom Widget Classes
Learn how to create custom widget prefabs.
WGUI uses the native nanos world class system. See the official documentation for more information.
Define the Custom Widget Class
Start by defining a new class that inherits from a base widget class. In this example, CustomTextBlock inherits from the TextBlock class.
Custom Constructor
Define a custom constructor for your class with the parameters you desire. This method will be called when an instance is created.
Spawn the Custom Widget
To use your custom widget, create an instance and add it to a specific panel. Any arguments provided from the third parameter will be passed directly to the constructor.
Last updated
Was this helpful?