public IEnumerator OpenProfilerReport() { ProfilerDriver.ClearAllFrames(); ProfilerDriver.profileEditor = true; yield return(null); ProfilerDriver.enabled = true; yield return(null); ProfilerDriver.enabled = false; yield return(null); var profileSaveFilePath = ProfilerHelpers.SaveProfileReport(k_ApplicationTickMarker); yield return(null); EditorWindow profilerWindow = null; ProfilerHelpers.OpenProfileReport(profileSaveFilePath, k_ApplicationTickMarker, win => { profilerWindow = win; }); yield return(TestUtils.WaitForDelayCall()); yield return(TestUtils.WaitForDelayCall()); Assert.IsNotNull(profilerWindow); File.Delete(profileSaveFilePath); profilerWindow.Close(); }
public IEnumerator StopProfilerRecording() { ProfilerHelpers.StartProfilerRecording("Application.Tick", true, false); // Wait for two delay call since we are doing two in the function yield return(TestUtils.WaitForDelayCall()); yield return(TestUtils.WaitForDelayCall()); ProfilerHelpers.StopProfilerRecording(); Assert.IsFalse(ProfilerDriver.enabled); }
public IEnumerator OpenProfiler() { EditorWindow theProfilerWindow = null; ProfilerHelpers.OpenProfiler(k_ApplicationTickMarker, profilerWindow => { theProfilerWindow = profilerWindow; }); yield return(TestUtils.WaitForDelayCall()); yield return(TestUtils.WaitForDelayCall()); Assert.IsNotNull(theProfilerWindow); theProfilerWindow.Close(); }