Description
The Overlay
property of the SceneViewportWidget
class provides access to the SceneOverlayWidget
associated with the viewport. This overlay can be used to display additional UI elements or information on top of the scene view, such as toolbars, status indicators, or other interactive components.
Usage
To use the Overlay
property, you can access it directly from an instance of SceneViewportWidget
. This allows you to manipulate the overlay widget, such as adding or removing UI elements, or updating its properties to reflect changes in the scene or user interactions.
Example
// Example of accessing the Overlay property
SceneViewportWidget viewportWidget = new SceneViewportWidget();
Editor.SceneOverlayWidget overlay = viewportWidget.Overlay;
// Example of using the overlay
// Add a custom UI element to the overlay
CustomUIElement customElement = new CustomUIElement();
overlay.AddElement(customElement);
// Update overlay properties
overlay.IsVisible = true;
overlay.UpdateLayout();