👌Mod Reload
Introduction
This can be said to be the most technical aspect of the entire NML, but its usage is very simple.
You only need to add [Hotfixable]
for a method and set Config.isEditor=true
and then click button.
The function is often used to debug. Consider such a scene:
If you add log and restart game once and once again to get information of the bug, it wastes a lot of time.
If you uses the function, you can pause game, and modify your mod code, add log or even try to fix the bug. Then click button to reload your mod, you can see result.
Except above, you can use it on UI designing.
Usage
Implement
IReloadable
and setConfig.isEditor=true
Launch game
Meet problem
Add
Hotfixable
attribute to methods to modifyModify methods
Click Reload Button of your mod
Example
No video now.
Tips
You cannot add
Hotfixable
toMonoBehaviour
's methods such asAwake
,Update
You cannot add
Hotfixable
to constructor or deconstructor of a classYou can add
Hotfixable
toReload
You can add
Hotfixable
at runtimeYou can create a new method at runtime through
Hotfixable
You can add
Hotfixable
to lambda method, like below:
Last updated