Description
The BuildUI
method is responsible for constructing the user interface for the BlockTool
within the Mesh Editor. This method returns an instance of Editor.Widget
, which represents the UI component that will be displayed to the user when the tool is active.
Usage
To use the BuildUI
method, you typically do not call it directly. Instead, it is invoked as part of the tool's lifecycle when the tool is activated in the editor. The method constructs and returns the UI elements that are necessary for interacting with the BlockTool
.
Example
// Example of how BuildUI might be used internally within the BlockTool class
public class BlockTool : EditorTool
{
public override void OnEnabled()
{
// This method might be called when the tool is enabled
Editor.Widget ui = BuildUI();
// Add the UI to the editor's interface
// EditorInterface.AddWidget(ui);
}
public Editor.Widget BuildUI()
{
// Construct the UI elements for the BlockTool
Editor.Widget widget = new Editor.Widget();
// Configure the widget as needed
return widget;
}
}