// Use this for initialization public static void Execute() { var testRunner = new GameObject().AddComponent<SimpleTestRunner>(); testRunner.UpdatePlayerSettings(); testRunner.ThrownAnException(); Destroy(testRunner.gameObject); }