Skip to content

Bepinex did not inject to game process properly #12

@danielchim

Description

@danielchim

The current modded session flow unable to launch the modded game session properly.

How BepInEx Loads via Doorstop (The Reference Architecture)

Unity Doorstop is a DLL proxy that intercepts the game's startup to load managed assemblies (like BepInEx) before Unity scripts run. Here's the chain:

DLL Proxying: A proxy DLL (winhttp.dll, version.dll, or winmm.dll) is placed in the game's root directory. When the game EXE starts, Windows loads the proxy instead of the real system DLL.
Configuration: Doorstop reads doorstop_config.ini from the same directory as the game EXE (the game's working directory/install folder). It expects:
INI

[UnityDoorstop]
enabled=true
targetAssembly=BepInEx\core\BepInEx.Preloader.dll

Assembly Loading: Doorstop locates the targetAssembly path and loads it into the Mono/IL2CPP runtime before the game's scripts execute.
BepInEx takes over: BepInEx.Preloader.dll patches Harmony, loads plugins from BepInEx/plugins/, etc.

Critical requirement: Doorstop resolves paths relative to the game executable's directory (where the proxy DLL sits), unless an absolute path is used for targetAssembly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions