public void Setup() { if (!FrameTimingManager.IsFeatureEnabled()) { Assert.Ignore("Frame timing stats are disabled in Player Settings, skipping test."); } if (Application.isBatchMode) { Assert.Ignore("Frame timing tests are not supported in batch mode, skipping test."); } // HACK #1 - really shouldn't have to do this here, but previous tests are leaking gameobjects var objects = GameObject.FindObjectsOfType <GameObject>(); foreach (var o in objects) { // HACK #2 - must not destroy DebugUpdater, which happens to have an EventSystem. if (o.GetComponent <EventSystem>() == null) { CoreUtils.Destroy(o); } } m_DebugFrameTiming = new DebugFrameTiming(); }
public StatsPanel(DebugFrameTiming frameTiming) { var list = new List <DebugUI.Widget>(); frameTiming.RegisterDebugUI(list); foreach (var w in list) { AddWidget(w); } }