![]() This does not work because the CustomObject from the old assembly and the new one is not the same. Static bool Unload(UnityModManager.ModEntry modEntry) ![]() HarmonyInstance.Create().PatchAll(Assembly.GetExecutingAssembly()) Static bool Load(UnityModManager.ModEntry modEntry) But it works only with static fields and cannot copy the types created by your assembly. It allows to copy fields to your new assembly. I will write a few examples to make it clearer.Īnother new field attribute is SaveOnReload. It stays in shadows and if we do not remove the scripts they can still work. In fact, old assembly can not be unloaded. You only need to create the Unload function and remove all patches and objects of old assembly. In mod options should appear Reload button. Add EnableReloading attribute to the main class and set Unload function to modEntry. In the source code of your mod, you need to specify that the mod can be reloaded. Start XCOPY /Y /R "$(TargetPath)" "D:\Games\YourGame\Mods\$(ProjectName)\$(ProjectName).dll*" ![]() The "1.0.*" will allow the compiler to automatically increment the version number.įor convenience, configure the Post-build Event Command Line so that the assembly file is automatically copied to the game. To successfully load assembly, its version must be greater than the previous one. In Visual Studio, set the assembly version as "1.0.*". Alternatively, you can use the Settings app to uninstall Minecraft. Uninstall Minecraft Windows 10 Using Settings App. Follow the on-screen prompts to fully uninstall Minecraft. Right-click the Minecraft program and select the Uninstall option. This feature is added in version 0.14.1. You can compile assembly and load it into game without restarting. Then a list of installed programs will be shown here.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |