Overlays can be used to display edit modes, tools, and tool settings on top of the windows they are used in, such as scene tools in the scene view window.
They are displayed as floating translucent containers that allow users to access contextual controls while maintaining background visibility.
Overlays can be found on / used with;
The various elements of overlays include:
The controls that can be placed in overlays are the same as their equivalent in UI Toolkitbut inherit some overlay functionalities (like collapse state, orientation, and panel).
These elements require specific styling, so it is recommended they inherit one of the predefined EditorToolbartypes, such as:
For information about how to style overlay content go to the Unity manual ->
Overlays can float freely or be dragged to dock on the edges or corner of their parent windows. A container’s position is adjusted by using the dragger.
Overlays can be set to display in different layouts:
When horizontal and vertical layouts are not defined for an overlay, it will collapse when docked on the edges of its window.
Drop zones are blue areas that appear as a container is being dragged to highlight where the container can be docked and where the container was before.
The shapes of target and ghost drop zones are displayed differently depending on the location of the overlay container / target.
For more information go to drop zone color variables ->
Most overlay actions are done in the overlay menu. This menu can be accessed in two ways:
Transient overlays are a type of overlay that is not controlled by a user, and only drawn in the active scene view when requested by the visible property.
For more information about transient states go to Unity Scripting References ->