From f0bd9f1eb8302ee20425b3b3d7b8ad08751e3362 Mon Sep 17 00:00:00 2001 From: Caeden Statia Date: Tue, 7 Jan 2020 16:44:09 -0800 Subject: [PATCH] maybe fixed a potentially game breaking bug --- Counters+/Utils/TextHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Counters+/Utils/TextHelper.cs b/Counters+/Utils/TextHelper.cs index 33f4a00..85ad4f0 100644 --- a/Counters+/Utils/TextHelper.cs +++ b/Counters+/Utils/TextHelper.cs @@ -27,7 +27,7 @@ public static Canvas CreateCanvas(Vector3 Position, bool floatingHUD = false, fl CanvasGO.transform.position = Position; CanvasGO.transform.rotation = Quaternion.Euler(CountersController.settings.hudConfig.HUDRotation); - GameObject coreGameHUD = Resources.FindObjectsOfTypeAll()?.FirstOrDefault()?.gameObject ?? null; + GameObject coreGameHUD = Resources.FindObjectsOfTypeAll()?.FirstOrDefault(x => x.isActiveAndEnabled)?.gameObject ?? null; FlyingGameHUDRotation flyingGameHUD = Resources.FindObjectsOfTypeAll().FirstOrDefault(x => x.isActiveAndEnabled); bool attachToHUD = flyingGameHUD != null && CountersController.settings.hudConfig.AttachToBaseGameHUDFor360; if (CountersController.settings.hudConfig.AttachBaseGameHUD && !attachToHUD && coreGameHUD != null)