Is there a way to direct editor focus to the inspector?

Hey, I’m able to shift editor focus over to a custom window by adding it to the menu:

        [MenuItem("AA_Tools/Variants/Variant Template Utility")]
        private static void OpenWindow() => GetWindow<VariantTemplateUtility>().Show();

But I can’t seem to work out how to get it to do the same thing with an inspector window. Is this possible?

1 Like

I’m also looking for a solution to this.

I was able to achieve it with this:

public static void SelectContentListing()
{
    var catalogListingManager = FindObjectOfType<ContentManager>().m_ContentCatalogListingManager;
    Selection.activeObject = catalogListingManager;
    EditorApplication.ExecuteMenuItem("Window/General/Inspector");
    EditorGUIUtility.PingObject(catalogListingManager);
}
1 Like

Thank you so much. That worked perfectly.

1 Like