With the development of HotPatcher and my research on resource management technology, more and more features are being implemented around HotPatcher, and the implementation is becoming increasingly complex. Coupled with continuous updates of the engine, maintaining compatibility for a large and comprehensive plugin has become more difficult.
With the arrival of the new generation engine UE5, HotPatcher will also follow up with support for UE5 and develop new features based on UE5’s characteristics. I hope it will not only be a resource packaging tool but also include a comprehensive resource management solution encompassing resource management, auditing, packaging, hot updates, package optimization, and build enhancements, and serve as an open resource processing framework.
This article will introduce the modular progress of HotPatcher, support for existing features, and how to use the powerful packaging capability of HotPatcher to customize modular extensions based on project needs. Finally, I will discuss the future development plans for the HotPatcher project.
Currently, most of the core functions of HotPatcher support both UE4.21-UE5.1. However, each new engine version release brings too much effort and time for plugin adaptation. Moreover, most features used to be integrated into a single plugin, which limited functionality expansion.
Therefore, in response to these issues, I have initiated a modular transformation plan for the HotPatcher project. HotPatcher will only provide core packaging functionalities, with other extensions implemented independently and available for download as needed. Of course, the modularization of functions is not an overnight process. Since 2021, I have been considering separating non-core functionalities into standalone modules for on-demand download and use, but I did not achieve complete modular transformation.
Now, in 2023, it is time to do this. Time flies; on November 22, 2019, I made the first commit to this project, and now three years have passed, with over 700 commits and numerous blog articles. I am glad to see HotPatcher being applied in many projects, and at the same time, the plugin functions are continuously updated and iterated.
Modular Transformation
First of all, HotPatcher is an independent UE plugin. If one wants to implement a similar modular framework that can be compiled within UE, it can be counterproductive.
Therefore, my implementation is similarly based on UE’s plugin mechanism, and modules developed based on HotPatcher are also UE code plugins; they will depend on HotPatcher and can include its code.
Taking the already completed modular transformation of the GameFeaturePacker module as an example, I will introduce the mechanism of HotPatcher modules and the functionalities that can be implemented.
GameFeaturePacker is something I implemented earlier, which can be used to package the new UE5 GamePlay mechanism GameFeature
. Detailed information can be found in my previous article: UE5: Game Feature Research.
First, as mentioned previously, it is also a UE plugin, and its uplugin file is as follows:
1 | { |
It depends on the HotPatcher plugin, and to register the module in HotPatcher, an Editor
module must be available, and its LoadingPhase
should be set to PostDefault
. In the Build.cs
of the Editor module, include the HotPatcher modules:
1 | PublicDependencyModuleNames.AddRange( |
This allows the HotPatcher’s functionalities to be used within this independent plugin.
The C++ definition of the GameFeaturePackerEditor
module must also follow specific conventions, inheriting from FHotPatcherModBaseModule
and overriding the GetModDesc
interface:
1 | class FGameFeaturePackerEditorModule : public FHotPatcherModBaseModule |
Implement the module registration in the .cpp
file:
1 | void FGameFeaturePackerEditorModule::StartupModule() |
Note: Always call the base class
FHotPatcherModBaseModule
functions in theStartupModule
andShutdownModule
of the module.
Register the current plugin in the GetModDesc
function.
A HotPatcher mod definition can have the following attributes:
1 | struct HOTPATCHEREDITOR_API FHotPatcherModDesc |
It supports specifying the Mod name, whether it is a built-in Mod (core Mod included in HotPatcher), as well as the Mod version, description, URL, update link, and minimum supported HotPatcher version.
Finally, there’s FHotPatcherActionDesc
, which describes the operational logic in the HotPatcher interface and includes Slate UI. Actions like ByPatch
/ByRelease
in the plugin are all part of HotPatcherAction.
Having actions in a mod will create an option in the list and include a dedicated interface, which can be customized with Slate controls.
Actions can be added as follows:
1 | TmpModDesc.ModActions.Emplace( |
This completes the registration of a HotPatcher module, which can implement special functionalities within this independent plugin and be registered in the HotPatcher panel.
Moreover, opening the HotPatcher interface will show the installed mods:
Mods have the following classifications:
- Built-In, built-in modules in the plugin;
- Installed, those installed and developed by the HotPatcher author;
- ThirdParty, modules created by users themselves that are installed;
- Not-Installed, modules maintained by the HotPatcher developer but not installed locally;
- Unsupport, installed but with dependencies on a version of HotPatcher higher than that in the project, and they will not be registered in HotPatcher.
Built-in Modules
Currently, I have split multiple modules from the originally supported features of HotPatcher. The available modules are:
- HotPatcherCore, the built-in module of the plugin, containing the latest core functions with
ByPatch
andByRelease
actions. - GameFeaturePacker, the module for packaging GameFeatures, which supports a minimum HotPatcher version of v80, with major updates focusing on the main UE5 line version.
- ShaderPatcherUE, to patch ShaderLibrary, see the article: UE Hot Update: Create Shader Patch
HotPatcherCore is included in the main repository, while the other modules are independent repositories.
When downloading, they can all be cloned together, and they are by default located in the Mods
directory.
Install Modules
HotPatcherCore is included in the HotPatcher plugin, while the other modules are managed in the form of git submodules.
You can check the current available modules under hxhb/HotPatcher/Mods on Github.
Since the modules are managed as git submodules, both downloading and updating modules require the respective submodule commands.
For initial downloading of public modules, execute the following command in the root directory of the HotPatcher plugin:
1 | git submodule update --init --recursive |
For subsequent module updates:
1 | git submodule foreach git fetch |
I have an article explaining git commands, which also includes detailed descriptions of submodules, see: Quick Start Guide to Git#submodule
Note: Not all modules shown in the images above can be pulled, as some modules are currently not public, and there will be permission errors during pulling. However, this does not affect functionality.
Currently available modules can be found in the HotPatcher Star category: hxhb/list/HotPatcher.
Create New Modules
As mentioned earlier, I hope HotPatcher is an open resource management framework, allowing anyone to develop modules based on HotPatcher functionality according to their project’s needs.
To facilitate this, I provide a Mod Template plugin that can be modified based on this template: hxhb/HotPatcherModTemplate
It includes an Editor and Runtime Module, with the Module declaration and definition created according to the HotPatcherMod specifications, and only requires the corresponding registration information to be implemented in the GetModDesc
interface.
Version Release
Due to the modularization, the release process for HotPatcher will change slightly.
- The version release of HotPatcher will only include the HotPatcherCore module.
- The updates for independent mods will be released separately.
There will be no impact on existing functionalities, as core functionalities like ByPatch
and ByRelease
are still integrated into the plugin itself.
Other modules will need to be updated manually, and attention should be paid to the HotPatcher version dependencies of the mods.
Future Plans
Currently, the functionalities supported by HotPatcher:
At present, HotPatcher has supported a large number of mod functionalities, and some new runtime optimization mechanisms are also being brewed and developed.
Most modules have not yet been opened to the public but may be released at an appropriate time and in an appropriate manner in the future. If your project hopes to use these modules and technologies, commercial collaboration for technical consultation is welcome.
The development plan for HotPatcherCore currently includes several important items, primarily targeting the UE5 engine:
- Support for World Partition
- Adaptation support for IoStore
- Optimization support for GameFeature
- Enhancing packaging efficiency
- Improving modular development capabilities to facilitate intervention at various stages of the packaging process
Currently, the development and updates of HotPatcher are maintained and supported by myself. I have limited personal energy and only spare time for open-source matters. Friends interested in joining the development of HotPatcher are welcome to contribute to the project.
Donations
For several years, HotPatcher has been freely available as a tool. The development and update process has consumed a significant amount of my energy and time.
Nevertheless, I still insist on providing this tool for free and continuously updating it simply because I love coding and hope to share my technology with more people, enhancing the technical sharing within the UE community. The value of interest cannot be measured in money.
In the future, the core functionality of HotPatcher will continue to be released as free tools and will be consistently updated.
If the HotPatcher project has helped you, and you hope it can do better in the future, you can scan the donation QR code below.
WeChat Pay | Alipay |
---|---|
After you donate, you can click on the HotPatcher Donor Information Collection Form to submit your donation information.
If you have submitted your donation information after donating, I will periodically整理, displaying it on the project page to express my gratitude for your donations.