mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
加载热更新程序集的崩溃bug修正
This commit is contained in:
@@ -9,6 +9,7 @@ using UnityEngine;
|
|||||||
using TEngine;
|
using TEngine;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using YooAsset;
|
using YooAsset;
|
||||||
|
using Cysharp.Threading.Tasks;
|
||||||
|
|
||||||
namespace GameMain
|
namespace GameMain
|
||||||
{
|
{
|
||||||
@@ -38,6 +39,12 @@ namespace GameMain
|
|||||||
base.OnEnter(procedureOwner);
|
base.OnEnter(procedureOwner);
|
||||||
Log.Debug("HyBridCLR ProcedureLoadAssembly OnEnter");
|
Log.Debug("HyBridCLR ProcedureLoadAssembly OnEnter");
|
||||||
m_procedureOwner = procedureOwner;
|
m_procedureOwner = procedureOwner;
|
||||||
|
|
||||||
|
LoadAssembly().Forget();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async UniTaskVoid LoadAssembly()
|
||||||
|
{
|
||||||
m_LoadAssemblyComplete = false;
|
m_LoadAssemblyComplete = false;
|
||||||
m_HotfixAssemblys = new List<Assembly>();
|
m_HotfixAssemblys = new List<Assembly>();
|
||||||
|
|
||||||
@@ -78,7 +85,8 @@ namespace GameMain
|
|||||||
|
|
||||||
Log.Debug($"LoadAsset: [ {assetLocation} ]");
|
Log.Debug($"LoadAsset: [ {assetLocation} ]");
|
||||||
m_LoadAssetCount++;
|
m_LoadAssetCount++;
|
||||||
GameModule.Resource.LoadAsset<TextAsset>(assetLocation,LoadAssetSuccess);
|
var result = await GameModule.Resource.LoadAssetAsync<TextAsset>(assetLocation);
|
||||||
|
LoadAssetSuccess(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_LoadAssemblyWait = true;
|
m_LoadAssemblyWait = true;
|
||||||
|
Reference in New Issue
Block a user