Add conditional profiling in Editor (run only when using Profiler window)
This commit is contained in:
@@ -93,7 +93,7 @@ namespace FlaxEditor.Windows.Profiler
|
||||
_liveRecordingButton = toolstrip.AddButton(editor.Icons.Play64);
|
||||
_liveRecordingButton.LinkTooltip("Live profiling events recording");
|
||||
_liveRecordingButton.AutoCheck = true;
|
||||
_liveRecordingButton.Clicked += () => _liveRecordingButton.Icon = LiveRecording ? editor.Icons.Stop64 : editor.Icons.Play64;
|
||||
_liveRecordingButton.Clicked += OnLiveRecordingChanged;
|
||||
_clearButton = toolstrip.AddButton(editor.Icons.Rotate32, Clear);
|
||||
_clearButton.LinkTooltip("Clear data");
|
||||
toolstrip.AddSeparator();
|
||||
@@ -118,6 +118,12 @@ namespace FlaxEditor.Windows.Profiler
|
||||
_tabs.SelectedTabChanged += OnSelectedTabChanged;
|
||||
}
|
||||
|
||||
private void OnLiveRecordingChanged()
|
||||
{
|
||||
_liveRecordingButton.Icon = LiveRecording ? Editor.Icons.Stop64 : Editor.Icons.Play64;
|
||||
ProfilingTools.Enabled = LiveRecording;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the mode.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user