Conversation
|
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. |
|
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 |
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 :)