Skip to content

Resolve nested classes, generic field counts, and inherited statics - #146

Open
ero-qt wants to merge 19 commits into
LiveSplit:masterfrom
ero-qt:class-lookups
Open

Resolve nested classes, generic field counts, and inherited statics#146
ero-qt wants to merge 19 commits into
LiveSplit:masterfrom
ero-qt:class-lookups

Conversation

@ero-qt

@ero-qt ero-qt commented Aug 28, 2026

Copy link
Copy Markdown

Depends on #145.
Part of #141.

Three lookups the walk couldn't answer yet:

  • Nested classes: get_class("Ns.Outer+Inner"), written the way .NET writes it. The leaf name matches, the enclosing chain checks the rest. Builds without the enclosing offset measured miss cleanly.
  • Generic field counts: a generic instance declares no count of its own, so mono reads it from the definition through the instantiation descriptor. IL2CPP already puts the count on the instance.
  • Inherited statics: a static field found on a parent measures into the parent's own static table. wait_get_static_instance and UnityPointer roots were reading the starting class's table instead.

The offsets tables grow the members these need, measured per build. Tests cover each lookup and the miss paths, plus a poll-once helper so the wait_ methods can be pinned without hanging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant