Ver Fonte

修复exe运行报错(防止aot dll裁剪)

大爷 há 1 ano atrás
pai
commit
b58e21f998
1 ficheiros alterados com 4 adições e 0 exclusões
  1. 4 0
      Unity/Assets/Scripts/Loader/CodeLoader.cs

+ 4 - 0
Unity/Assets/Scripts/Loader/CodeLoader.cs

@@ -4,6 +4,7 @@ using Sirenix.Utilities;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Drawing;
 using System.IO;
 using System.Reflection;
 using UnityEngine;
@@ -168,6 +169,9 @@ namespace ET
         //编译时会检查这个方法,需保留
         public void LoadHotfix()
         {
+            //防裁剪
+             var xx = ImageConversion.EnableLegacyPngGammaRuntimeLoadBehavior;
+            Image x = Image.FromFile("");
         }
     }
 }