How praydog/uevr works
Project Type and Purpose
• UEVR is a C++-based “injector/mod” tool for Unreal Engine 4/5 games that enables VR support (OpenVR/OpenXR).
• It consists of:
– A standalone Injector GUI (UEVRInjector.exe)
– A DLL that is injected into the target game process
– A modular hook-and-mod system (DirectX, input, UE object hooks)
– A scripting layer (Lua via sol2) and plugin loader
A. Injector Frontend
– UEVRInjector.exe (.NET 6.0 GUI for process selection, runtime choice, pre-injection settings)
B. Injection Engine & Core Framework (DLL)
– ExceptionHandler
– Framework (init, config)
– ModsManager (loads all mods)
C. Hook Manager
– WindowsMessageHook
– XInputHook
– DInputHook
– D3D11Hook / D3D12Hook (intercepts render calls)
D. Mod Subsystems
1. Lua Scripting (lua-api)
• LuaLoader
• ScriptContext / ScriptState (sol2 bindings)
2. Plugin Loader (C++ plugin system)
• PluginLoader
3. UObject Hooks (SDKDumper, UObjectHook helpers)
4. VR-Specific Mods
• Bindings, CVarManager, OverlayComponent
• Runtime Adapters: OpenVR / OpenXR modules
• RenderTargetPoolHook, FakeStereoRenderingHooks
E. Rendering & Shaders
– Shader compile scripts + compiled .inc shaders
– VR runtime frame submission (via OpenVR/OpenXR APIs)
– OpenVR SDK
– OpenXR SDK
– Lua (embedded)
– sol2 (C++↔Lua binding)
– ImGui (in-game menu)
– DirectX 11/12, Windows APIs
1) User interacts with Injector GUI → selects target process + runtime → clicks “Inject.”
2) Injector GUI → invokes DLL injection into target game process.
3) Injected DLL → initializes Core Framework → registers ExceptionHandler.
4) Core → sets up Hook Manager → installs DirectX, input, and Windows message hooks.
5) Core → invokes ModsManager →
• LuaLoader loads & executes user Lua scripts → communicates back via bindings.
• PluginLoader discovers C++ plugins → registers hooks or UI callbacks.
• VR mods configure stereoscopic rendering mode.
7) VR Runtime Adapter (OpenVR/OpenXR) → submits left/right eye textures to HMD.
8) In-game ImGui menu (via uevr-imgui) → overlays on top of game render → receives input via hooked XInput / Windows message hooks.
Architectural Patterns
• Layered Architecture:
– Frontend (GUI)
– Injection/Core
– Hook Abstraction Layer
– Mod/Plugin Layer
– Rendering/VR Adapter
• Plugin Pattern: C++ plugin loader for extensibility
• Adapter Pattern: Abstract VR runtimes (OpenVR vs. OpenXR)
• Embedding & Binding: sol2 for Lua scripting integration