Referencing the source
Last updated
Last updated
Using singletons and performing Harmony patching is great, but how do you actually figure out what singletons are available to you and what methods within those singletons or other classes can be patched?
dnSpy is a great tool which allows you to inspect the contents of an assembly. It offers a lot more than just inspecting assemblies, but for our purposes, this is all we need.
Download & extract dnSpy to a directory of your choosing
Launch the dnSpy.exe
At the top left, click on File
, then Open
and open a Puck.dll
in your libs
folder of your mod.
You can now look through the Puck.dll
and observe all types and classes used by Puck. Not only that, but you can also see a minimally obfuscated representation of the Puck source code. Having understanding of the code that runs Puck will be beneficial in creating more advanced mods which change some core logic of the game.