Search Unity

How do we show Tag Manager via script with 2018.3?

Discussion in 'Scripting' started by Seanba, Dec 30, 2018.

  1. Seanba

    Seanba

    Joined:
    Nov 17, 2012
    Posts:
    33
    Hi there. I have a plugin that as a convenience to the user will open the Tag Manager for them via this script ...

    Code (CSharp):
    1. EditorApplication.ExecuteMenuItem("Edit/Project Settings/Tags and Layers");
    However, with 2018.3 the Project Settings UI has been refactored. How can we open the Tag Manager now through script?

    I see that the C# reference on Github has APIs that looks like it would do the trick ...

    Code (CSharp):
    1. TagManagerInspector.ShowWithInitialExpansion(TagManagerInspector.InitialExpansionState.Tags);
    Code (CSharp):
    1. TagField.OpenTagInspector()
    ... but those are declared with internal or private access. Any pointers? Thanks.
     
  2. Seanba

    Seanba

    Joined:
    Nov 17, 2012
    Posts:
    33
    For those wondering I've found a solution:

    Code (CSharp):
    1. SettingsService.OpenProjectSettings("Project/Tags and Layers");
     
    TareqProjects, eses and Baste like this.