static HashSet<IPanel> GetRootPanels()

robot_2Generated
code_blocksInput

Description

The GetRootPanels method in the Editor.EditorUtility class is a static method that retrieves all the root panels currently available in the editor environment. A root panel is a top-level UI element that does not have a parent panel, serving as a container for other UI components.

Usage

To use the GetRootPanels method, simply call it without any parameters. It returns a HashSet<IPanel> containing all the root panels.

Example

// Example usage of GetRootPanels
var rootPanels = Editor.EditorUtility.GetRootPanels();

foreach (var panel in rootPanels)
{
    // Perform operations with each root panel
    // For example, logging the panel's type
    Log.Info($"Root Panel Type: {panel.GetType()}");
}