Repository navigation
Release v0.1.11
v0.1.11
Field offsets on IL2CPP / explicit-layout structs
Field-returning tools now surface each field's runtime offset, so IL2CPP reverse-engineering workflows (native memory reads, Cheat Engine / lsdebugger, struct mapping) no longer require decompiling a type just to read its offsets. (#20)
What's new
get_type_fields,get_type_info, andsearch_membersnow include a field's offset when one is discoverable, from two sources checked in order:FieldLayoutmetadata — real[StructLayout(LayoutKind.Explicit)]fields (OffsetSource = "field-layout").- Il2CppDumper "dummy DLL" attributes — Unity IL2CPP dumps annotate every field with a synthetic
[FieldOffset(Offset = "0x330")]plus a paired[Token(Token = "0x4000B02")](OffsetSource = "il2cpp", surfaced together withIl2CppToken).
- Keys:
Offset/OffsetSource/Il2CppTokenonget_type_fieldsandget_type_info;offset/offset_source/il2cpp_tokenonsearch_members(each tool keeps its existing casing convention).
Compatibility
- Purely additive. Offset keys are omitted for ordinary managed fields with no offset info, so existing responses are unchanged.
- No new dependencies — parsing uses the already-referenced dnlib API.
- The synthetic-attribute match keys on named string args, so it never misfires on the positional-int
System.Runtime.InteropServices.FieldOffsetAttribute.
Testing
- Checked-in end-to-end coverage for both offset sources plus the managed-omission case, across all three tools. Full suite: 161 pass / 0 fail against dnSpy 6.6.0.