Skip to content

Commit f7845c2

Browse files
authored
Merge pull request #158 from dzfischer/CustomBuild
example for build.props
2 parents 859ee30 + 59dfd0b commit f7845c2

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
.idea*
33
.vs*
4+
.vscode*
45
**/Debug/**
56
GalacticScale.sln.DotSettings.user
67
DSP_Plugins.GalacticScale/Directory.Build.props
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<Project>
2+
<PropertyGroup>
3+
<Plugins_Dir>D:\PATH\R2\DysonSphereProgram\profiles\PROFILE\BepInEx\GS2Dev\GalacticScale2</Plugins_Dir>
4+
<DSP_Dir>D:\PATH\Steam\SteamApps\common\Dyson Sphere Program</DSP_Dir>
5+
<BepInExCore_Dir>D:\PATH\R2\DysonSphereProgram\profiles\PROFILE\BepInEx\core</BepInExCore_Dir>
6+
7+
<!-- pdb2mdb_Path is optional, needed if you want to enable debugging the modded game. More detailed instructions:
8+
9+
0. Backup all your stuff.
10+
1. Install Unity 2018-4-12 from https://unity3d.com/get-unity/download/archive
11+
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
12+
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
13+
4. Edit the game's DSPGAME_Data\boot.config: add player-connection-debug=1 to the end
14+
5. Download pdb2mdb from https://gist.github.com/jbevain/ba23149da8369e4a966f#file-pdb2mdb-exe
15+
16+
That covers initial setup; here's the process to make a debuggable build and launch:
17+
6. Compile the debug version of the plugin; make sure you're generating .pdb files
18+
7. Drag your .dll onto pdb2mdb, this should generate a new file in the same folder as your .dll
19+
8. Copy your .dll and your newly-generated .mdb to your BepInEx plugins directory
20+
9. Set breakpoints in Visual Studio
21+
10. In any order: in Visual Studio go to Debug > Attach Unity Debugger; and start the game
22+
11. Select the game EXE in the Attach Debugger window in Visual Studio
23+
24+
Derived from https://bepinex.github.io/bepinex_docs/master/articles/advanced/debug/plugins_vs.html#installing-required-tools
25+
which (at the time) linked through to: https://github.com/dnSpy/dnSpy/wiki/Debugging-Unity-Games#turning-a-release-build-into-a-debug-build
26+
-->
27+
<!-- <pdb2mdb_Path>D:\Self-Contained Programs\pdb2mdb</pdb2mdb_Path> -->
28+
</PropertyGroup>
29+
</Project>

0 commit comments

Comments
 (0)