Description
The SceneOverlay
property of the EditorTool
class provides access to the overlay widget that is displayed in the scene view. This widget can be used to display additional information or controls directly within the scene editor.
This property is marked with the JsonIgnore
attribute, indicating that it should not be serialized when converting the object to JSON format.
Usage
To use the SceneOverlay
property, you can access it directly from an instance of the EditorTool
class. This property is useful for customizing the scene view with additional UI elements that are relevant to the tool's functionality.
Example usage:
var myTool = new MyCustomEditorTool();
var overlayWidget = myTool.SceneOverlay;
// Customize the overlay widget as needed
Example
// Example of accessing the SceneOverlay property
public class MyCustomEditorTool : EditorTool
{
public void CustomizeOverlay()
{
// Access the SceneOverlay property
Widget overlay = this.SceneOverlay;
// Example: Add a button to the overlay
Button myButton = new Button("Click Me");
overlay.AddChild(myButton);
}
}