/// <summary> /// Updates the diagnostic settings /// </summary> /// <param name="eventData"><see cref="DiagnosticsEventData"/> coming in</param> public void OnDiagnosticSettingsChanged(DiagnosticsEventData eventData) { showCpu = eventData.ShowCpu; showMemory = eventData.ShowMemory; showFps = eventData.ShowFps; enabled = eventData.Visible; }
public void OnDiagnosticSettingsChanged(DiagnosticsEventData eventData) { eventCount++; // In response to this event, trigger an unregister to occur - this should // succeed in unregistering the handler, no matter when this is called (i.e // in a nested event loop) CoreServices.DiagnosticsSystem.UnregisterHandler <IMixedRealityDiagnosticsHandler>(this); }
public void TestSelectedObjectAccess() { Assert.DoesNotThrow(() => { DiagnosticsEventData eventData = new DiagnosticsEventData(EventSystem.current); eventData.Initialize(null); Assert.IsNull(eventData.selectedObject); }); }
private void InitializeInternal() { eventData = new DiagnosticsEventData(EventSystem.current); Visible = MixedRealityToolkit.Instance.ActiveProfile.DiagnosticsSystemProfile.Visible; ShowCpu = MixedRealityToolkit.Instance.ActiveProfile.DiagnosticsSystemProfile.ShowCpu; ShowFps = MixedRealityToolkit.Instance.ActiveProfile.DiagnosticsSystemProfile.ShowFps; ShowMemory = MixedRealityToolkit.Instance.ActiveProfile.DiagnosticsSystemProfile.ShowMemory; RaiseDiagnosticsChanged(); }
/// <inheritdoc /> public override void Initialize() { if (!Application.isPlaying) { return; } eventData = new DiagnosticsEventData(EventSystem.current); // Apply profile settings ShowDiagnostics = MixedRealityToolkit.Instance.ActiveProfile.DiagnosticsSystemProfile.ShowDiagnostics; ShowProfiler = MixedRealityToolkit.Instance.ActiveProfile.DiagnosticsSystemProfile.ShowProfiler; diagnosticVisualizationParent = CreateDiagnosticVisualizationParent(); }
/// <inheritdoc /> public override void Initialize() { if (!Application.isPlaying) { return; } eventData = new DiagnosticsEventData(EventSystem.current); ShowCpu = MixedRealityToolkit.Instance.ActiveProfile.DiagnosticsSystemProfile.ShowCpu; CpuUseTracker = new CpuUseTracker(MixedRealityToolkit.Instance.ActiveProfile.DiagnosticsSystemProfile.CpuBuffer); ShowFps = MixedRealityToolkit.Instance.ActiveProfile.DiagnosticsSystemProfile.ShowFps; FpsUseTracker = new FpsUseTracker(MixedRealityToolkit.Instance.ActiveProfile.DiagnosticsSystemProfile.FpsBuffer); ShowMemory = MixedRealityToolkit.Instance.ActiveProfile.DiagnosticsSystemProfile.ShowMemory; MemoryUseTracker = new MemoryUseTracker(MixedRealityToolkit.Instance.ActiveProfile.DiagnosticsSystemProfile.MemoryBuffer); // Setting the visibility creates our GameObject reference, so set it last after we've configured our settings. Visible = MixedRealityToolkit.Instance.ActiveProfile.DiagnosticsSystemProfile.Visible; RaiseDiagnosticsChanged(); }