This commit is contained in:
2025-12-02 18:48:32 +08:00
parent 92ba80b399
commit bf1ca60b3b
2357 changed files with 262694 additions and 7 deletions

View File

@@ -0,0 +1,40 @@
using System;
using UnityEngine;
namespace Mirror
{
public class FpsMinMaxAvgGraph : BaseUIGraph
{
protected override void CollectData(int category, out float value, out GraphAggregationMode mode)
{
value = 1 / Time.deltaTime;
switch (category)
{
case 0:
mode = GraphAggregationMode.Average;
break;
case 1:
mode = GraphAggregationMode.Min;
break;
case 2:
mode = GraphAggregationMode.Max;
break;
default:
throw new ArgumentOutOfRangeException($"{category} is not valid.");
}
}
protected override void OnValidate()
{
base.OnValidate();
if (CategoryColors.Length != 3)
CategoryColors = new[]
{
Color.cyan, // avg
Color.red, // min
Color.green // max
};
IsStacked = false;
}
}
}