Skip to content

Conversation

@ilyvion
Copy link

@ilyvion ilyvion commented May 25, 2024

As the title suggests, this adds support for auto-hotswapping.

The way I made it is so that, at a five second interval, for all the assemblies in the HotSwapMain.AssemblyFiles dictionary, look for files named [PathToAssembly.dll].hotswap. If such a file exists, delete it, and then call HotSwapMain.ScheduleHotSwap(). This lets you easily add a step to your build script to create such a file after having built, thus saving you from even having to go into RimWorld and hit Home or click the hotswap button. Here's a small demo of it in action:

Animation

I also added a settings dialog to turn the feature on or off. (It is off by default)

I have not updated the dlls because I don't think it's sensible to rely on external contributors providing safe ones in PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant