diff --git a/Source/Editor/Windows/Profiler/Assets.cs b/Source/Editor/Windows/Profiler/Assets.cs
index d5b735fa3..3cd66e4eb 100644
--- a/Source/Editor/Windows/Profiler/Assets.cs
+++ b/Source/Editor/Windows/Profiler/Assets.cs
@@ -50,6 +50,8 @@ namespace FlaxEditor.Windows.Profiler
{
Title = "Assets Memory Usage (CPU)",
AnchorPreset = AnchorPresets.HorizontalStretchTop,
+ Offsets = Margin.Zero,
+ Height = SingleChart.DefaultHeight,
FormatSample = v => Utilities.Utils.FormatBytesCount((int)v),
Parent = mainPanel,
};
diff --git a/Source/Editor/Windows/Profiler/CPU.cs b/Source/Editor/Windows/Profiler/CPU.cs
index 5246957f6..ff9b0e253 100644
--- a/Source/Editor/Windows/Profiler/CPU.cs
+++ b/Source/Editor/Windows/Profiler/CPU.cs
@@ -69,6 +69,8 @@ namespace FlaxEditor.Windows.Profiler
{
Title = "Update",
AnchorPreset = AnchorPresets.HorizontalStretchTop,
+ Offsets = Margin.Zero,
+ Height = SingleChart.DefaultHeight,
FormatSample = v => (Mathf.RoundToInt(v * 10.0f) / 10.0f) + " ms",
Parent = mainPanel,
};
diff --git a/Source/Editor/Windows/Profiler/GPU.cs b/Source/Editor/Windows/Profiler/GPU.cs
index dd90f891b..7b837768f 100644
--- a/Source/Editor/Windows/Profiler/GPU.cs
+++ b/Source/Editor/Windows/Profiler/GPU.cs
@@ -37,6 +37,8 @@ namespace FlaxEditor.Windows.Profiler
{
Title = "Draw (CPU)",
AnchorPreset = AnchorPresets.HorizontalStretchTop,
+ Offsets = Margin.Zero,
+ Height = SingleChart.DefaultHeight,
FormatSample = v => (Mathf.RoundToInt(v * 10.0f) / 10.0f) + " ms",
Parent = mainPanel,
};
diff --git a/Source/Editor/Windows/Profiler/MemoryGPU.cs b/Source/Editor/Windows/Profiler/MemoryGPU.cs
index 00f24821a..dd3c6d6ea 100644
--- a/Source/Editor/Windows/Profiler/MemoryGPU.cs
+++ b/Source/Editor/Windows/Profiler/MemoryGPU.cs
@@ -51,7 +51,9 @@ namespace FlaxEditor.Windows.Profiler
{
Title = "GPU Memory Usage",
AnchorPreset = AnchorPresets.HorizontalStretchTop,
- FormatSample = v => Utilities.Utils.FormatBytesCount((int)v),
+ Offsets = Margin.Zero,
+ Height = SingleChart.DefaultHeight,
+ FormatSample = v => Utilities.Utils.FormatBytesCount((ulong)v),
Parent = mainPanel,
};
_memoryUsageChart.SelectedSampleChanged += OnSelectedSampleChanged;
diff --git a/Source/Editor/Windows/Profiler/SingleChart.cs b/Source/Editor/Windows/Profiler/SingleChart.cs
index 4985d88e1..cd24ac635 100644
--- a/Source/Editor/Windows/Profiler/SingleChart.cs
+++ b/Source/Editor/Windows/Profiler/SingleChart.cs
@@ -12,6 +12,7 @@ namespace FlaxEditor.Windows.Profiler
///
internal class SingleChart : Control
{
+ internal const float DefaultHeight = TitleHeight + 60;
private const float TitleHeight = 20;
private const float PointsOffset = 4;
private readonly SamplesBuffer _samples;
@@ -63,7 +64,7 @@ namespace FlaxEditor.Windows.Profiler
///
/// The maximum samples to collect.
public SingleChart(int maxSamples = ProfilerMode.MaxSamples)
- : base(0, 0, 100, 60 + TitleHeight)
+ : base(0, 0, 100, DefaultHeight)
{
_samples = new SamplesBuffer(maxSamples);
_sample = string.Empty;