Explorar o código

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

大爷 hai 1 ano
pai
achega
b58e21f998
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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("");
         }
     }
 }