Skip to content

Add support for hot-reloading#166

Merged
Phantomical merged 1 commit into
KSPModStewards:masterfrom
Phantomical:support-hot-reload
May 10, 2026
Merged

Add support for hot-reloading#166
Phantomical merged 1 commit into
KSPModStewards:masterfrom
Phantomical:support-hot-reload

Conversation

@Phantomical
Copy link
Copy Markdown
Contributor

@Phantomical Phantomical commented May 9, 2026

Most of the changes here are just properly unregistering stuff when being destroyed, but there were a few explicit callbacks needed and it also uncovered a number of cases where HotReloadKSP wasn't quite handling things correctly.

The explicit new changes to support reload are:

  • Load SystemHeatSettings when hot-loaded
  • Destroy the UI when SystemHeatUI is destroyed
  • Explicitly recreate the editor UI when hot-reloaded.
  • We need to explicitly grab the prefab objects from the old assembly. Hot reloading still takes care of replacing any widgets within.

Getting this to work requires HotReloadKSP v0.1.4

Most of the changes here are just properly unregistering stuff when
being destroyed, but there were a few explicit callbacks needed and it
also uncovered a number of cases where HotReloadKSP wasn't quite
handling things correctly.

The explicit new changes to support reload are:
* Load SystemHeatSettings when hot-loaded
* Destroy the UI when SystemHeatUI is destroyed
* We need to explicitly grab the prefab objects from the old assembly.
  Hot reloading still takes care of replacing any widgets within.
@Phantomical Phantomical marked this pull request as ready for review May 10, 2026 03:41
@Phantomical Phantomical merged commit 08cfb4f into KSPModStewards:master May 10, 2026
1 check passed
@Phantomical Phantomical deleted the support-hot-reload branch May 10, 2026 05:53
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