소스 검색

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

大爷 1 년 전
부모
커밋
b58e21f998
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  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("");
         }
     }
 }