diff --git a/ResoniteMetricsCounter/Metrics/MetricsCounter.cs b/ResoniteMetricsCounter/Metrics/MetricsCounter.cs index 1c20b1c..b2ce545 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; @@ -61,12 +61,12 @@ private bool ShouldSkipImpl(IWorldElement element) } var slot = element.GetSlotFast(); - if (slot is null || IgnoredHierarchy is null) + if (slot is null) { - return false; + return true; } - return IgnoredHierarchy.IsChildOf(slot, includeSelf: true); + return IgnoredHierarchy?.IsChildOf(slot, includeSelf: true) ?? false; } [MethodImpl(MethodImplOptions.AggressiveInlining)] diff --git a/ResoniteMetricsCounter/Patch/Metric_Profiler_Patch.cs b/ResoniteMetricsCounter/Patch/Metric_Profiler_Patch.cs index 762f273..aa87eba 100644 --- a/ResoniteMetricsCounter/Patch/Metric_Profiler_Patch.cs +++ b/ResoniteMetricsCounter/Patch/Metric_Profiler_Patch.cs @@ -1,4 +1,4 @@ -using FrooxEngine; +using FrooxEngine; using FrooxEngine.ProtoFlux; using HarmonyLib; using ResoniteModLoader; diff --git a/ResoniteMetricsCounter/UIX/Item/MetricItemBase.cs b/ResoniteMetricsCounter/UIX/Item/MetricItemBase.cs deleted file mode 100644 index 04aaccd..0000000 --- a/ResoniteMetricsCounter/UIX/Item/MetricItemBase.cs +++ /dev/null @@ -1,110 +0,0 @@ -using Elements.Core; -using FrooxEngine; -using FrooxEngine.UIX; -using System.Diagnostics; -using System.Runtime.CompilerServices; - -namespace ResoniteMetricsCounter.UIX.Item; - -internal abstract class MetricItemBase -{ - private const float DEFAULT_ITEM_SIZE = 32; - private const float DEFAULT_PADDING = 4; - - private readonly Slot slot; - private readonly Sync labelField, timeField; - private readonly Sync metricTint; - private readonly ReferenceProxySource referenceProxySource; - private readonly RectTransform metricRect; - private readonly Sync percentageField; - - public MetricItemBase(Slot container) - { - var uiBuilder = new UIBuilder(container); - - uiBuilder.Style.MinHeight = DEFAULT_ITEM_SIZE; - uiBuilder.Style.TextAutoSizeMin = 0; - - slot = uiBuilder.Panel(RadiantUI_Constants.Neutrals.DARK).Slot; - - slot.AttachComponent