UnityPlayerPatcher
Binary patcher for PEAK's UnityPlayer.dll that disables -force-vulkan command-line argument handling through direct assembly modifications, preventing Vulkan graphics backend initialization.
Install / Use
/learn @CyR1en/UnityPlayerPatcherREADME
UnityPlayerPatcher
A low-level binary patcher designed to modify the Unity engine portable executable (PE) binary called UnityPlayer.dll for the game PEAK, specifically targeting and disabling the handling of the -force-vulkan command-line argument. This is achieved through direct assembly-level modifications, effectively preventing the engine from initializing with the Vulkan graphics backend, regardless of launch parameters.
How to Use
This patcher is now integrated in my fork of Unity Doorstop that is included in the BepInExPack for PEAK. This allows me to patch UnityPlayer at runtime, giving you an untouched UnityPlayer.dll when the game closes.
New way to bypass Vulkan
Make sure you have the latest version of BepInExPack for PEAK (5.4.75301)
To bypass Vulkan, all you have to do is set -dx12 to your launch parameters.
-
Steam:
PEAK > Settings > Properties... > General -
Thunderstore:
Settings > Debugging > Set launch parameters -
r2modman:
Settings > Debugging > Set launch parameters -
Gale:
Settings > PEAK settings > Set custom launch arguments
-
Download the Patcher
Link: https://github.com/CyR1en/UnityPlayerPatcher/releases/download/0.1.1/UnityPlayerPatcher.exe
-
Locate Your Game Directory
Navigate to your PEAK installation folder where
UnityPlayer.dllis located. This is typically:[Steam Directory]\steamapps\common\PEAK\ -
Place the Patcher
Copy
UnityPlayerPatcher.exeinto the same directory asUnityPlayer.dll. -
Run the Patcher
Double-click
UnityPlayerPatcher.exeor execute the command in the same directory:./UnityPlayerPatcher.exe -
Expected Output
============================================ UnityPlayer Vulkan Bypass By CyR1en ============================================ [+] Backed up original DLL as: UnityPlayer_Original.dll [*] Searching for pattern: E8 D9 86 F7 FF [*] Located CALL instruction at offset: 0x6c73d2 [+] Patched E8 D9 86 F7 FF -> 31 C0 90 90 90 (XOR EAX,EAX; NOP; NOP; NOP) [*] Bytes at offset 0x6c73d2: 31 C0 90 90 90 [*] Vulkan bypass patch applied successfully to: UnityPlayer.dll Press any key to exit...
Restoring Original Functionality
- Delete the patched
UnityPlayer.dll - Rename
UnityPlayer_Original.dllback toUnityPlayer.dll
How It Works
Technical Implementation
The patcher employs binary-level modification to intercept Unity's graphics API selection process during the handling of the "force-vulkan" command-line argument. Here's the technical breakdown:
Target Pattern Identification
The tool searches for the specific byte sequence E8 D9 86 F7 FF, which represents a CALL FUN_1806406b0 instruction in the UnityPlayer.dll binary. Based on the surrounding code context and execution flow, this function call appears to be part of the Vulkan activation pathway, though its exact purpose is inferred from the assembly analysis.
Assembly-Level Modification
; Original instruction
E8 D9 86 F7 FF CALL FUN_1806406b0
; Patched replacement
31 C0 XOR EAX,EAX ; Set return value to 0 (failure)
90 NOP ; No operation
90 NOP ; No operation
90 NOP ; No operation
Execution Flow Modification
- Before Patch: Command-line parser detects "force-vulkan" → calls unknown function → if successful, presumably sets Vulkan-related flags
- After Patch: Command-line parser detects "force-vulkan" → function call bypassed with failure return → Vulkan forcing pathway interrupted
Compilation
Requirements
- CMake 3.10 or higher
- C++17 compatible compiler (Visual Studio 2017+, GCC 7+, Clang 5+)
- Windows SDK (for filesystem operations)
Build Instructions
-
Clone or Download Source
Ensure you have the project structure:
UnityPlayerPatcher/ ├── CMakeLists.txt ├── src/ │ └── main.cpp └── README.md -
Compile the Project
cmake --build build --config Release -
Locate Executable
The compiled executable will be available at:
build\bin\release\UnityPlayerPatcher.exe
Safety Considerations
- Game Integrity: The patch only affects Vulkan forcing; all other game functionality remains intact
- Reversibility: Always keeps original DLL backup for easy restoration
- Anti-Virus: Some AV software may flag binary patchers as suspicious (false positive)
- Open Source: The patcher is open source to verify that it's not doing anything malicious.
- Automatically Built Executable: The executable in the release section is built and uploaded through GitHub actions. The executable is not manually uploaded from my computer, thus making sure that it only contains functionalities that can be viewed publicly.
License and Disclaimer
This project is licensed under the MIT License.
This tool is provided for educational and compatibility purposes. Users are responsible for compliance with applicable software licenses and terms of service. The author assumes no responsibility for any damage or issues resulting from the use of this patcher.
Important: This tool modifies game binaries. While designed to be safe and reversible, always maintain backups and use at your own discretion.
Related Skills
node-connect
353.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
353.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
353.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
