Page 1 of 1

[Python] How to reload a custom script?

Posted: 2019-11-10 12:13
by sertek
Hello,

I'm working on some local python scripts and I would like to know if there is any way to reload a script without having to restart my game every time because it's really painful :-(

Re: [Python] How to reload a custom script?

Posted: 2019-11-10 14:44
by AlonTavor
Reload works
https://www.geeksforgeeks.org/reloading-modules-python/

Obviously, any events registered will still use the old functions. You'll need to unregister them and then register them again.