-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #158 from dzfischer/CustomBuild
example for build.props
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<Plugins_Dir>D:\PATH\R2\DysonSphereProgram\profiles\PROFILE\BepInEx\GS2Dev\GalacticScale2</Plugins_Dir> | ||
<DSP_Dir>D:\PATH\Steam\SteamApps\common\Dyson Sphere Program</DSP_Dir> | ||
<BepInExCore_Dir>D:\PATH\R2\DysonSphereProgram\profiles\PROFILE\BepInEx\core</BepInExCore_Dir> | ||
|
||
<!-- pdb2mdb_Path is optional, needed if you want to enable debugging the modded game. More detailed instructions: | ||
|
||
0. Backup all your stuff. | ||
1. Install Unity 2018-4-12 from https://unity3d.com/get-unity/download/archive | ||
2. Copy WindowsPlayer.exe and UnityPlayer.dll from <unity-install-dir>\Editor\Data\PlaybackEngines\windowsstandalonesupport\Variations\win64_development_mono to the game directory. Rename WindowsPlayer.exe to DSPGAME.exe | ||
3. Copy (and overwrite) all files from <unity-install-dir>\Editor\Data\PlaybackEngines\windowsstandalonesupport\Variations\win64_development_mono\Data\Managed to the game's DSPGAME_Data\Managed folder | ||
4. Edit the game's DSPGAME_Data\boot.config: add player-connection-debug=1 to the end | ||
5. Download pdb2mdb from https://gist.github.com/jbevain/ba23149da8369e4a966f#file-pdb2mdb-exe | ||
|
||
That covers initial setup; here's the process to make a debuggable build and launch: | ||
6. Compile the debug version of the plugin; make sure you're generating .pdb files | ||
7. Drag your .dll onto pdb2mdb, this should generate a new file in the same folder as your .dll | ||
8. Copy your .dll and your newly-generated .mdb to your BepInEx plugins directory | ||
9. Set breakpoints in Visual Studio | ||
10. In any order: in Visual Studio go to Debug > Attach Unity Debugger; and start the game | ||
11. Select the game EXE in the Attach Debugger window in Visual Studio | ||
|
||
Derived from https://bepinex.github.io/bepinex_docs/master/articles/advanced/debug/plugins_vs.html#installing-required-tools | ||
which (at the time) linked through to: https://github.com/dnSpy/dnSpy/wiki/Debugging-Unity-Games#turning-a-release-build-into-a-debug-build | ||
--> | ||
<!-- <pdb2mdb_Path>D:\Self-Contained Programs\pdb2mdb</pdb2mdb_Path> --> | ||
</PropertyGroup> | ||
</Project> |