From 4d8279719ca13bac09a61906c4696f4bd52394ce Mon Sep 17 00:00:00 2001 From: b3ni15 Date: Mon, 15 Dec 2025 09:51:02 +0100 Subject: [PATCH] fix: Update button container path to reflect correct hierarchy and improve logging --- Main.cs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/Main.cs b/Main.cs index 710788b..8a2aff1 100644 --- a/Main.cs +++ b/Main.cs @@ -209,21 +209,11 @@ namespace KCM } } - // Try different paths to find the button container - var buttonContainer = Constants.MainMenuUI_T.Find("TopLevelUICanvas/TopLevel/Body/ButtonContainer/New"); + // Correct path based on debug output: MainMenuUI -> MainMenu -> TopLevel -> Body -> ButtonContainer -> New + var buttonContainer = Constants.MainMenuUI_T.Find("MainMenu/TopLevel/Body/ButtonContainer/New"); if (buttonContainer == null) { - // Try without TopLevelUICanvas prefix - buttonContainer = Constants.MainMenuUI_T.Find("TopLevel/Body/ButtonContainer/New"); - } - if (buttonContainer == null) - { - // Try direct path - buttonContainer = Constants.MainMenuUI_T.Find("Body/ButtonContainer/New"); - } - if (buttonContainer == null) - { - Main.helper.Log("Button container not found in any path"); + Main.helper.Log("Button container not found at MainMenu/TopLevel/Body/ButtonContainer/New"); return; } Main.helper.Log($"Found button container at: {buttonContainer.name}");