Skip to content

Attach IL2CPP games through the nearest measured build - #160

Open
ero-qt wants to merge 2 commits into
LiveSplit:masterfrom
ero-qt:il2cpp-nearest
Open

ero-qt wants to merge 2 commits into
LiveSplit:masterfrom
ero-qt:il2cpp-nearest

Conversation

@ero-qt

@ero-qt ero-qt commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Part of #141.

Replaces the IL2CPP version tables with a lookup over the measured builds, so every game attaches through the build nearest to its Unity version. The key is all four parts of UnityPlayer.dll's file version plus the width. A measured version gets its own entry. Any other version gets the newest entry whose major.minor is at or below its own, or the oldest entry when nothing is below. The metadata version is no longer part of the key, so attach no longer waits for global-metadata.dat.

  • Version, attach(process, Version) and wait_attach(process, Version) are gone with the tables. attach_auto_detect and wait_attach_auto_detect stay as they were.
  • Each entry says whether the image keeps its type start inline (2018.4 through 2020.1) or behind a handle, which is what the Version match in the class walk decided before. The 2018.4 through 2020.1 PDBs have Il2CppImage::typeStart, the later ones metadataHandle.

cargo test --all-features runs the suite. The new tests cover the lookup rule across versions and widths, attach_auto_detect for an unmeasured player, the class walk on both type start shapes, and images at 32 bit through a measured x86 entry.

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