Closed tinygridlock closed 2 years ago
using UnityEngine; using UnityEngine.UI;
public class App { public static int Main() { Test0(2); Test1("123,456"); Test2(null, null, Color.black); return 0; }
private static void Test0(int c) { //出错在 MetadataParser.cpp 524行 IL2CPP_ASSERT(paramCount == methodDef.parameterCount); //B的函数定义只有一个参数 编译成il后会有两个参数 void B(int d) { Debug.LogError(c + d); } B(1); B(2); } private static void Test1(string str) { //出错在 libil2cpp/vm/Array.cpp 54行 不用huatuo时不出错 var ss = str.Split(','); ss[0] += "qwe"; } private static void Test2(Image img1, Image img2, Color c1) { //出错在 Transform.cpp 1011行 IL2CPP_ASSERT(false); img1.color = img2.color = c1; }
}
确信。已修复 。这三个bug都非常有用,尤其是第一个bug,非常隐秘。感谢!!!
using UnityEngine; using UnityEngine.UI;
public class App { public static int Main() { Test0(2); Test1("123,456"); Test2(null, null, Color.black); return 0; }
}