Unity 2018.3 and ExecuteMenuItem

Hello, how can I open the “new style” of Player settings tab by code?
The command:

EditorApplication.ExecuteMenuItem("Edit/Project Settings/Player");
now generates this error:

ExecuteMenuItem failed because there is no menu named ‘Edit/Project Settings/Player’
UnityEditor.EditorApplication:ExecuteMenuItem(String)

… and I can’t find the right solution to fix it :frowning:

Update… ok, I can open Project Settings by:

EditorApplication.ExecuteMenuItem("Edit/Project Settings...");

…still can’t open Player tab

Try this one.

Selection.activeObject = Unsupported.GetSerializedAssetInterfaceSingleton(“PlayerSettings”);

While this does work, there seem to be new issues when opening the Player Settings for some platforms in the inspector. For example, a portable console target platform sits there throwing exceptions when Player Settings is opened in the inspector this way. It doesn’t do this when opened the new way through the Project Settings panel. This solution by Chris-KillerSnails is better: It opens the new plane and it doesn’t use a class called “Unsupported.”

SettingsService.OpenProjectSettings("Project/Player");
2 Likes