Open settings dialog like Player, Quality, Render Settings via C#.

In the Editor I’m trying to trigger opening the dialogs mentioned above via C#. This is opposed to using the menus.

Any one have a way to do this?

Use EditorApplication.ExecuteMenuItem and use the path indicated in the documentation. Remember, if it’s been docked previously, then it will bring it up in the inspector. You can not use Editor methods in the final build of your project, only when in the editor.

In the example below the OnClick method was wired up to a 4.6+ ui button to execute upon clickingl


using UnityEngine;
using UnityEditor;
using System.Collections;

public class ExecuteSomeMenuItem : MonoBehaviour {

	public void OnClick (string someValueIfNeeded) {
		EditorApplication.ExecuteMenuItem ("Edit/Project Settings/Quality");