edited June 2022 in ORK Scripting
I've made a discovery that I'm very excited to share. I've been really wrestling with the BlackBox nature of working with ORK as a DLL and the inability to dig into the code with breakpoints, stacktraces, and other debugging tools to help figure out what's going on when something doesn't work. Well today I figured out how to build and debug the DLL! This may be obvious and unremarkable for many programmers here, but for a novice like me who has not worked with DLLs before, this was a revelation and makes working with ORK so much easier. Posting a short how-to here in case it can help someone in the same boat.

-First you need to be a paying user with access to the source code. Unzip the source code for ORK 3.
-Open the ORK Framework 3.sln solution file in Visual Studio
-Open the solution explorer, right-click the Framework solution and go to 'properties'
-Under 'Build' click 'Advanced'
-Change 'Debugging information' to 'Portable'
-In the top menu choose 'Build' -> 'Build Solution'
-In the /bin/Unity_2019/ folder where your source code is located you will now have a bunch of .dll and .pdb files.
-These .pdb files are key as they link the source code to the dll for debugging!
-Copy the newly generated ORKFramework3.dll and ORKFramework3.pdb into your Unity assets folder \Assets\Gaming Is Love\Makinom 2\DLL\ (this will overwrite the Retail ORKFramework3.dll that's already there)

You're done! Now go ahead and add breakpoints to the source code that you built and even though you're using the DLL in your project you can step through and debug the code! Presumably you'll want to switch back to the retail DLL when you go to publish your project. Also not sure how updates will work... I guess that new DLL updates will overwrite the debug DLL and so you'll have to rebuild from the source code every time there is an update. But if you're okay with that small burden, enjoy debugging ORK!

PS - If you try this, please make sure you have a backup of your project in source control.

-Mike



Post edited by indoflaven on
  • Good job, will pin this for others to see :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • A new discovery:

    The IDE JetBrains Rider has a feature which automatically decompiles DLLs and allows for viewing, searching, and debugging the source. So what this means is that if you use the Rider IDE you don't have to worry about compiling PDB files every update in order to debug - it just works. Pretty cool!

    Please note the JetBrains Rider IDE is not free.

    Best, -Mike
Sign In or Register to comment.