Browse Source

修改在Editor模式下,会因为重复加载战斗dll(plugins目录的dll会默认加载)而产生的一处crash

大爷 2 years ago
parent
commit
3f418dc80c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Unity/Assets/Scripts/Loader/CodeLoader.cs

+ 2 - 2
Unity/Assets/Scripts/Loader/CodeLoader.cs

@@ -88,14 +88,14 @@ namespace ET
         {
             Dictionary<string, Type> typesInAssembly = new Dictionary<string, Type>();
             Assembly modelAss = null;
-
+#if ! UNITY_EDITOR 
             var battleDlls = (await YooAssetProxy.LoadAssetAsync<ConfigStringList>("HotupdateBattleDlls")).GetAssetObject<ConfigStringList>();
             foreach (var dll in battleDlls.List)
             {
                 Log.Info($"to load: {dll}");
                 Assembly.Load((await YooAssetProxy.GetRawFileAsync(dll)).GetRawBytes());
             }
-
+#endif
             var hotDlls = (await YooAssetProxy.LoadAssetAsync<ConfigKeyValueMap>("HotupdateDlls")).GetAssetObject<ConfigKeyValueMap>();
             foreach(var kv in hotDlls.keyValueMaps)
             {