Skip to content

Commit

Permalink
Merge pull request #158 from dzfischer/CustomBuild
Browse files Browse the repository at this point in the history
example for build.props
  • Loading branch information
innominata authored Feb 7, 2022
2 parents 859ee30 + 59dfd0b commit f7845c2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

.idea*
.vs*
.vscode*
**/Debug/**
GalacticScale.sln.DotSettings.user
DSP_Plugins.GalacticScale/Directory.Build.props
Expand Down
29 changes: 29 additions & 0 deletions GalacticScale2/Directory.Build.props.example
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>

0 comments on commit f7845c2

Please sign in to comment.