diff --git a/MiraAPI/Patches/HudManagerPatches.cs b/MiraAPI/Patches/HudManagerPatches.cs index e3a6b91..d138532 100644 --- a/MiraAPI/Patches/HudManagerPatches.cs +++ b/MiraAPI/Patches/HudManagerPatches.cs @@ -47,7 +47,12 @@ public static class HudManagerPatches { foreach (var aspect in baseButtons.GetComponentsInChildren(true)) { - if (aspect.gameObject == null) + if (!aspect.gameObject) + { + continue; + } + + if (aspect.gameObject.transform.parent.name == "TopRight") { continue; } @@ -65,7 +70,7 @@ public static class HudManagerPatches foreach (var button in HudManager.Instance.GetComponentsInChildren(true)) { - if (button.gameObject == null) + if (!button.gameObject) { continue; }