From 54bf8368f9cac804b816ad8e76b9bad667b8be28 Mon Sep 17 00:00:00 2001 From: yyl <yyl> Date: 星期三, 04 六月 2025 18:23:28 +0800 Subject: [PATCH] 18 子 2D卡牌客户端搭建 / 2D卡牌客户端搭建 会添加两次UIRoot的bug修复 --- Assets/Launch/Launch.cs | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Assets/Launch/Launch.cs b/Assets/Launch/Launch.cs index 1ffabc4..bffd859 100644 --- a/Assets/Launch/Launch.cs +++ b/Assets/Launch/Launch.cs @@ -154,10 +154,18 @@ LocalResManager.step = LocalResManager.LoadDllStep.None; // m_UICanvas.gameObject.SetActive(false); DestroySingleton(); + Type type = _hotUpdateAss.GetType("LaunchInHot").BaseType; - Type type = _hotUpdateAss.GetType("LaunchInHot"); - GameObject go = new GameObject("LaunchInHot"); - go.AddComponent(type); + var getInstance = type.GetMethod("get_Instance", BindingFlags.Public | BindingFlags.Static); + if (getInstance != null) + { + getInstance.Invoke(null, null); + } + else + { + Debug.LogError("鏃犳硶鎵惧埌get_Instance鏂规硶"); + } + Debug.Log("杩涘叆娓告垙娴佺▼"); } -- Gitblit v1.8.0