Il2CppDumper
Il2CppDumper copied to clipboard
il2cpp.h 某些結構的欄位應該為 union
Il2CppDumper v6.7.6
某個結構體為:
namespace UnityEngine {
public struct Color32 {
private int rgba; // Offset = "0x0"
public byte r; // Offset = "0x0"
public byte g; // Offset = "0x1"
public byte b; // Offset = "0x2"
public byte a; // Offset = "0x3"
}
}
但il2cpp.h是這樣:
struct UnityEngine_Color32_Fields {
int32_t rgba;
uint8_t r;
uint8_t g;
uint8_t b;
uint8_t a;
};
應該為:
struct UnityEngine_Color32_Fields {
union {
int32_t rgba;
struct {
uint8_t r;
uint8_t g;
uint8_t b;
uint8_t a;
};
};
};