"Run"/"Play" within Editor Script

Hey guys - sorry if this is super simple. I’m trying to figure out how to Run my project (i.e. like I’d pressed the “Play” button) from within an Editor script. Going through the scripting reference and not seeing anything.

using UnityEditor;

public class Test : Editor {

    [MenuItem("Tools/Play")]
    static void EditorPlaying(){
        if(EditorApplication.isPlaying == false) {
            EditorApplication.isPlaying = true;
        }
    }
}

works for me :sunglasses:

Awesome thanks! I thought that was readonly and ignored it :slight_smile: