diff --git a/ResoniteMetricsCounter/Metrics/MetricsCounter.cs b/ResoniteMetricsCounter/Metrics/MetricsCounter.cs index 3eccc27..1c20b1c 100644 --- a/ResoniteMetricsCounter/Metrics/MetricsCounter.cs +++ b/ResoniteMetricsCounter/Metrics/MetricsCounter.cs @@ -1,4 +1,4 @@ -using Elements.Core; +using Elements.Core; using FrooxEngine; using FrooxEngine.ProtoFlux; using ResoniteMetricsCounter.Serialization; @@ -35,6 +35,8 @@ public sealed class MetricsCounter : IDisposable [JsonInclude] public long ElapsedMilliseconds => stopwatch.ElapsedMilliseconds; public long ElapsedTicks => stopwatch.ElapsedTicks; + [JsonInclude] public int FrameCount { get; private set; } + public MetricsCounter(IEnumerable blackList) { shouldSkip = new(ShouldSkipImpl); @@ -163,4 +165,9 @@ internal void IgnoreHierarchy(Slot slot) { IgnoredHierarchy = slot; } + + internal void OnUpdate() + { + FrameCount++; + } }