public IEnumerator CallbacksClearedOnLoaderShutdown() { MockRuntime.SetFunctionCallback("xrBeginSession", (func) => XrResult.Success); InitializeAndStart(); yield return(new WaitForXrFrame(1)); StopAndShutdown(); Assert.IsTrue(OpenXRLoader.Instance == null, "OpenXR should not be running"); Assert.IsNull(MockRuntime.GetBeforeFunctionCallback("xrBeginSession"), "Callback should have been cleared when loader shut down"); }