fix: Improve logging for menu transitions and resolve top-level canvas references in ServerBrowser
This commit is contained in:
5
Main.cs
5
Main.cs
@@ -232,6 +232,7 @@ namespace KCM
|
||||
FirstSibling = true,
|
||||
OnClick = () =>
|
||||
{
|
||||
Main.helper?.Log("Multiplayer button clicked");
|
||||
SfxSystem.PlayUiSelect();
|
||||
TransitionTo(MenuState.ServerBrowser);
|
||||
}
|
||||
@@ -320,6 +321,10 @@ namespace KCM
|
||||
if (ServerBrowser.KCMUICanvas != null)
|
||||
{
|
||||
ServerBrowser.KCMUICanvas.gameObject.SetActive((int)state > 21);
|
||||
if (state == MenuState.ServerBrowser)
|
||||
{
|
||||
Main.helper?.Log($"TransitionTo ServerBrowser: browserRef={(ServerBrowser.serverBrowserRef != null ? "ready" : "null")}, canvas={(ServerBrowser.KCMUICanvas != null ? "ready" : "null")}");
|
||||
}
|
||||
helper.Log(((int)state > 21).ToString());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user