Skip to content

setup outline for hotreload#20

Open
ace9653 wants to merge 1 commit intohk-speedrunning:mainfrom
ace9653:hotreload
Open

setup outline for hotreload#20
ace9653 wants to merge 1 commit intohk-speedrunning:mainfrom
ace9653:hotreload

Conversation

@ace9653
Copy link
Copy Markdown
Contributor

@ace9653 ace9653 commented Sep 30, 2025

https://github.com/BepInEx/BepInEx.Debug?tab=readme-ov-file#scriptengine

if we dont swap to hot reloading i'll riot
basically we need to cleanup objects in OnDestroy, and then unpatch everything, i dont think i did it very elegantly (in theory, making everything a child of the debugmod instance would be much nicer)

other thing is we want to copy builds to scripts if we're hotreloading, and we need the directory squashed, it wont load if its in a subfolder

probably a better way to do everything thats in this commit :)

@ace9653 ace9653 requested a review from ManicJamie September 30, 2025 11:33
@ManicJamie
Copy link
Copy Markdown
Member

While I'm amenable to doing OnDestroy teardown to allow in-game dev, I absolutely do not want to add ScriptEngine to the build pipeline, at the very least because I'm not sure Silksong.Modlist is ready to handle ScriptEngine loaded plugins atm. However this is something we could revisit post-embargo with fresh eyes & with some better surrounding tooling.

@ManicJamie
Copy link
Copy Markdown
Member

It's post-embargo & we have fresher eyes - this probably needs to be reviewed for correctness but I'm much happier now with this solution.

This is probably blocked by Silksong.Modlist needing to manually check for hot reload solutions like ScriptEngine or AutoReload, since these naturally can't depend on it, but as long as builds aren't distributed it's probably Fine:tm:. I also think the the AutoPlugin solution (whatever it's actually called) is preferable to ScriptEngine, since it doesnt require moving builds to a scripts folder, pending checking if it actually works outside of linux.

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.

2 participants