using System; using System.Collections; using System.Reflection; using UnityEngine; using GFGGame.Launcher; using System.Collections.Generic; using System.Linq; using YooAsset; 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()); } IEnumerator LoadGameScene() { // 这里可以添加一些加载前的准备工作 // 直接加载游戏场景 var sceneHandle = YooAssets.LoadSceneAsync("Assets/ResIn/Scene/HotUpdate.unity"); yield return sceneHandle; } } }