yyl
2025-06-27 5f3093f4be480c9d37ea98b41ab7d730ed009208
Main/System/Debug/DebugUtility.cs
@@ -112,18 +112,18 @@
        // TODO YYL
        // if (StageLoad.Instance.currentStage is LoginStage)
        // {
        //     var loginWin = WindowCenter.Instance.Get<LoginWin>();
        //     if (loginWin != null)
        //     {
        //         var accountIpf = loginWin.transform.FindComponent("InputField", "Container_Account/AccountInput");
        //         if (accountIpf != null)
        //         {
        //             (accountIpf as InputField).text = StringUtility.Contact("Test_", UnityEngine.Random.Range(10000, 99999));
        //         }
            var loginWin = UIManager.Instance.GetUI<LoginWin>();
            if (loginWin != null)
            {
                var accountIpf = loginWin.transform.FindComponent("InputField", "Container_Account/AccountInput");
                if (accountIpf != null)
                {
                    (accountIpf as InputField).text = StringUtility.Contact("Test_", UnityEngine.Random.Range(10000, 99999));
                }
        //         var enterGame = loginWin.transform.FindComponent("Button", "Container_EnterGame/LoginButton");
        //         (enterGame as Button).onClick.Invoke();
        //     }
                var enterGame = loginWin.transform.FindComponent("Button", "Container_EnterGame/LoginButton");
                (enterGame as Button).onClick.Invoke();
            }
        // }
@@ -145,10 +145,10 @@
    {
        if (debugRoot == null)
        {
            var prefab = BuiltInLoader.LoadPrefab("UIRootDebug");
            debugRoot = GameObject.Instantiate(prefab);
            MonoBehaviour.DontDestroyOnLoad(debugRoot);
            debugRoot.name = "UIRootDebug";
            // var prefab = BuiltInLoader.LoadPrefab("UIRootDebug");
            // debugRoot = GameObject.Instantiate(prefab);
            // MonoBehaviour.DontDestroyOnLoad(debugRoot);
            // debugRoot.name = "UIRootDebug";
        }
    }