You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Unity版本:团结引擎:1.8.1(2022.3.62t3)


HybridCRL版本:v8.9.0
使用平台:
微信开发者工具:
热更代码加载代码:
`byte[] dllBytes = ReadDllBytes(dllPath);
try
{
Assembly.Load(dllBytes); // <- 这里内存炸了
Log.I($"加载 {assemblyName} 成功");
}
catch (Exception e)
{
Log.E($"加载失败: {assemblyName} - {e.Message} {e.StackTrace} {e.InnerException?.StackTrace ?? ""}");
System.GC.Collect(2, GCCollectionMode.Forced, true);
}
`
热更程序集配置:

Publishing Settings:

微信开发者工具报错日志:

Assembly.Load时内存炸掉的程序集引用关系:

其实不一定内存炸的是Main程序集,还会偶尔炸TTDC_Ht_Message程序集的内存,虽然这个程序集仅有两个代码脚本,总计也就1000行代码,并且引用也只引用了一个AOT程序集,所以我不太明白为什么HybridCLR在加载热更程序集的时候为什么这么容易炸内存。我的热更程序集dll体积总计也就不到500KB的体积:

🧎跪求大神给条思路,引入HybricCLR项目运行都运行不动,一旦加载热更程序集,内存必炸。
Beta Was this translation helpful? Give feedback.
All reactions