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
[Python] How to reload a custom script?
-
sertek
- Posts: 1
- Joined: 2019-11-10 12:09
[Python] How to reload a custom script?
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
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
-
AlonTavor
- PR:BF2 Developer
- Posts: 2991
- Joined: 2009-08-10 18:58
Re: [Python] How to reload a custom script?
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.
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.
