A tiny dll loader for Unity games
- Rust 100%
| .cargo | ||
| src | ||
| .gitignore | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
| rust-toolchain.toml | ||
| rustfmt.toml | ||
Unity DLL Loader
A tiny dll loader for Unity games.
By default it builds a version.dll proxy: it forwards the exports to the real
Windows version.dll, then loads every .dll found in the dlls folder next to
the game executable.
Layout
Game.exe
version.dll
dlls/
a_dll.dll
another_dll.dll
yet_another_dll.dll
DLLs are loaded in deterministic filename order.
Building
Build the default proxy DLL:
cargo build --release
Output:
target/x86_64-pc-windows-msvc/release/version.dll
Build a plain loader DLL without the version.dll proxy exports (in case the game just doesn't load it by default and you want to inject it in any other way):
cargo build --release --no-default-features
Output:
target/x86_64-pc-windows-msvc/release/dll_loader.dll
If you are cross-compiling and C:\Windows\System32\version.dll is not available
at build time, point PROXY_DLL_PATH at a copy of it:
PROXY_DLL_PATH=/windows/version.dll cargo build --release
Notes
- It skips loading DLLs when running inside
UnityCrashHandler64.exe(because it also loads theversion.dll). - Long paths are supported up to the Windows UTF-16 path limit.