using System; using System.Collections; using System.Reflection; using UnityEngine; using GFGGame.Launcher; using System.Collections.Generic; using System.Linq; using YooAsset; using UnityEngine.SceneManagement; namespace GFGGame { public class HotUpdateCodeLoader : SingletonMonoBase { public static List AOTMetaAssemblyNames { get; } = new List() { "mscorlib.dll", "System.dll", "System.Core.dll", "Game.Launcher.dll", "ThirdParty.dll" }; private void Awake() { DontDestroyOnLoad(this.gameObject); } public void StartLoad() { //StartCoroutine(LoadGameScene()); Debug.Log(VersionController.Instance.package.CheckLocationValid("Assets/ResIn/Font/GameFont2/FZKTJW--GB1-0.ttf")); SceneManager.LoadScene("HotUpdate"); } //IEnumerator LoadGameScene() //{ // // 这里可以添加一些加载前的准备工作 // // 直接加载游戏场景 // Debug.Log("11111"); // //var sceneHandle = YooAssets.LoadSceneAsync("Assets/ResIn/Scene/HotUpdate.unity"); // //var sceneHandle = YooAssets.LoadSceneAsync("HotUpdate"); // string location = "Assets/ResIn/Scene/HotUpdate"; // var sceneMode = UnityEngine.SceneManagement.LoadSceneMode.Single; // var physicsMode = LocalPhysicsMode.None; // bool suspendLoad = false; // string packageName = VersionController.DefaultPackage; // SceneHandle handle = YooAssets.GetPackage(packageName).LoadSceneAsync(location, sceneMode, physicsMode, suspendLoad); // yield return handle; // Debug.Log("22222"); // //yield return sceneHandle; //} } }