Generic attribute to mark custom overlay buttons for automatic discovery and registration.
More...
|
| Type | OverlayType [get, set] |
| | Type of overlay this button should appear in (e.g., typeof(QuickEditOverlay))
|
| |
| double | Order [get, set] |
| | Display order of the button (decimal: integer=row, fractional=position in row) Lower values appear first.
|
| |
| string | Section [get, set] |
| | Section name for organizing buttons (e.g., "Transform", "Components", "Custom") Each overlay defines its own sections.
|
| |
| bool | FullWidth [get, set] |
| | Whether this button should take full width of the overlay.
|
| |
| Type | TargetComponentType [get, set] |
| | Type of component required for this button to be visible (optional) Example: typeof(Drive) - button only shows when Drive component is selected.
|
| |
| bool | RequiresSelection [get, set] |
| | Whether this button requires an active selection in the scene.
|
| |
| bool | PlayModeOnly [get, set] |
| | Whether this button is only available in play mode.
|
| |
| bool | EditModeOnly [get, set] |
| | Whether this button is only available in edit mode.
|
| |
| bool | EnabledByDefault [get, set] |
| | Whether this button is enabled by default.
|
| |
| string | Group [get, set] |
| | Optional group name for further organizing buttons within a section.
|
| |
Generic attribute to mark custom overlay buttons for automatic discovery and registration.
This attribute can be applied multiple times to register the same button in different overlays.
The decimal order system allows precise control over button placement:
- Integer part (e.g., 100) defines the row
- Decimal part (e.g., 0.1, 0.2) defines position within the row (left to right)
Example usage:
[OverlayButton(typeof(QuickEditOverlay), order: 100.0, section: "Custom")]
[OverlayButton(typeof(QuickEditOverlay), order: 100.0, section: "Components")]
[OverlayButton(typeof(DesOverlay), order: 50.0, section: "Tools")]
[OverlayButton(typeof(QuickEditOverlay), order: 100.0, section: "Custom")]
[OverlayButton(typeof(QuickEditOverlay), order: 100.1, section: "Custom")]
[OverlayButton(typeof(QuickEditOverlay), order: 100.2, section: "Custom")]
[OverlayButton(typeof(QuickEditOverlay), order: 101.0, section: "Custom")]