Set Graphics Emulation to No Emulation as Default?

How do I set my Graphics Emulation to No Emulation as its default state? Since it changes back to OpenGL ES when I restart Unity.

I’ve tried:

using UnityEngine;
using UnityEditor;
 
[InitializeOnLoad]
public class Watchtower
{
    static Watchtower()
    {
        Debug.Log("Watchtower");
        EditorApplication.ExecuteMenuItem("Edit/Graphics Emulation/No Emulation");
    }
}

But it gives me this error:

ExecuteMenuItem failed because there is no menu named 'Edit/Graphics Emulation/No Emulation'

Thanks!

Same question and still dont’t know why, alternative solution below is ok in 4.6.0, hope it helps.

using UnityEngine;
using UnityEditor;

[InitializeOnLoad]

public class EditInitialSetting
{
    static EditInitialSetting()
    {
        EditorApplication.update += Update;
    }

    static void Update()
    {
        bool isSuccess = EditorApplication.ExecuteMenuItem("Edit/Graphics Emulation/No Emulation");
        if (isSuccess)
            EditorApplication.update -= Update;
    }
}

@hu_amao That is an amazing piece of code! It does work ! Albeith while building, this doesnt build for android. …it gives an error:
The name ‘EditorApplication’ doesnt exist in the current context…:frowning:

Here is another one for automatically setting the Graphics Emulation to WebGL 2.0:

using UnityEngine;
using UnityEditor;

[InitializeOnLoad]
public class EditorGraphicsEmulationOnStart
{
	static EditorGraphicsEmulationOnStart()
	{
		EditorApplication.delayCall = () =>
		{
			EditorApplication.ExecuteMenuItem("Edit/Graphics Emulation/WebGL 2.0");
		};
	}
}