| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- 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<HotUpdateCodeLoader>
- {
- public static List<string> AOTMetaAssemblyNames { get; } = new List<string>()
- {
- "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;
- //}
- }
- }
|