|
| VisualElement | CreateSeparator () |
| | Helper method to create a separator line.
|
| |
| VisualElement | CreateButtonRow () |
| | Helper method to create a button row container.
|
| |
| Button | CreateButton (string text, string tooltip, System.Action onClick, string cssClass=null) |
| | Helper method to create a button.
|
| |
| Button | CreateIconButton (Texture icon, string tooltip, System.Action onClick, string cssClass=null) |
| | Helper method to create an icon button.
|
| |
| Texture | LoadIcon (string path) |
| | Helper method to load an icon from the project.
|
| |
| VisualElement | CreateIconElement (Texture icon, int size=16) |
| | Helper method to create an icon element.
|
| |
| Label | CreateLabel (string text, FontStyle fontStyle=FontStyle.Normal) |
| | Helper method to create a label.
|
| |
| void | AddComponent (System.Type componentType) |
| | Helper method to add a component to selected object (similar to QuickEdit)
|
| |
Base class for creating custom overlay sections with multiple controls.
Inherit from this class to create complex UI sections with multiple buttons, labels, fields, and other visual elements organized in your own layout.
Example usage:
[OverlayButton(typeof(QuickEditOverlay), order: 200.0, section: "Custom")]
{
public override string SectionTitle => "Advanced Tools";
public override Texture SectionIcon => LoadIcon("d_Settings");
public override VisualElement CreateContent()
{
var container = new VisualElement();
container.style.flexDirection = FlexDirection.Column;
var header = new Label("Advanced Tools");
header.style.unityFontStyleAndWeight = FontStyle.Bold;
container.Add(header);
var row1 = CreateButtonRow();
row1.Add(CreateButton("Tool 1", "First tool", OnTool1Click));
row1.Add(CreateButton("Tool 2", "Second tool", OnTool2Click));
container.Add(row1);
container.Add(CreateButton("Process All", "Process all items", OnProcessAll));
return container;
}
private void OnTool1Click() {
Base class for creating custom overlay sections with multiple controls.
Definition OverlaySectionBase.cs:50