UE热更新:一次资源异常的故障分析

Recently, I encountered an extremely bizarre bug involving two maps. One map, A, can be accessed with its PAK placed in the engine’s automatic mount directory, but it cannot be accessed from the hot update directory. The other map, B, behaves completely oppositely: it is abnormal in the automatic mount directory but works normally in the hot update directory.

At first glance, the issue appears entirely elusive, with two mutually exclusive behaviors occurring within the same logical framework. Moreover, the hot update mount and the automatic mount only differ in timing and priority, so this problem shouldn’t theoretically exist.

While the issue can ultimately be resolved on the business logic side, this behavior involves another very obscure path within the engine. Understanding why and how it works is crucial. Therefore, I analyzed the engine’s code based on this behavior, came to a reasonable conclusion, and devised a method to detect and mitigate this issue.

This article assumes that readers have some basic knowledge of UE hot updates; if in doubt, please refer to other articles in this blog’s hot update series for more information.

Read more »

部署一个自托管的MEMOS笔记系统

For personal knowledge management, I am very keen on creating my own local-first and open source self-hosted services. This way, I can avoid relying on any platform, have complete autonomy over my data, and be able to migrate services at any time. Options like Obsidian, Hexo blog, and the memos introduced in this article all meet these criteria.

The protagonist of this article, memos, is an open-source lightweight note-taking service that allows you to take notes in a way similar to posting on Weibo, supporting TAG marking and citations. It features an account system and permission management, allowing web access at any time, and notes can be public or private, offering great flexibility. I chose it because it complements Obsidian; Obsidian is still too heavy for my needs—it works well on PC but has a poor mobile experience. Thus, I need a lightweight, always-available note-taking service.

This article will introduce how to deploy a Memos service on a VPS using Docker, along with Nginx to bind the domain name, Certbot to issue and automatically update SSL certificates, and regular backups of the memos database, as well as some optimization configurations I made for the service.

Read more »

利用HotPatcher加速真机资源验证

In previous articles, I primarily introduced how HotPatcher can be applied in the hot update process. However, HotPatcher is not just capable of fulfilling the needs for hot updates; it is also a flexible resource packaging framework.

As the project development reaches a certain stage, a massive amount of resources needs to be packaged, and waiting for a complete package to be built can take a long time. If a real device encounters issues, the serial process of repair -> package -> verify can become exceedingly lengthy. There are often cases of script, data, or other resource errors that lead to package abnormalities.

In such cases, waiting hours to generate a complete package prevents smoke testing from proceeding. Even if you rebuild the package, there’s no guarantee that there won’t be other overlooked issues; otherwise, you have to start over again.

Based on this pain point, we urgently need a method to quickly fix resource issues within packages and validate them during the development phase. HotPatcher provides this functionality, allowing you to utilize it fully without waiting for a complete package.

This article will introduce how to utilize the editor features provided by HotPatcher to quickly package preset configurations and specific resources, accelerating the validation process of resources on real devices and significantly improving testing efficiency.

Read more »

开源杂谈:HotPatcher的开发进展

It’s been more than half a year since the last version of HotPatcher was released. It has good support for UE4, but lacks support for UE5, and many people in the group frequently ask about the adaptation status.

The last Release version of HotPatcher, v81.0, was released on 20230604. It only supported UE5.1.0 and did not support WP and Nanite. Subsequently, Epic launched UE5.2 and 5.3, but the plugin was not adapted. Although compilation errors could be fixed manually, the feature support in UE5 was in a semi-finished state.

Taking advantage of the Qingming Festival holiday, I worked hard for several days, performing comprehensive optimization and adaptation support for HotPatcher. It can now be compatible with the latest versions from UE4.21 to UE5, and a new Release version has been published: v82.0. The latter part of this article will introduce the adaptation status, precautions, and update log of HotPatcher in UE5.

Additionally, in 2020, I wrote an article: Some Thoughts and Ideas on Open Source. Over the past two years, I’ve had some new ideas about maintaining open-source projects, which I’ll summarize here.

Read more »

循迹旅行:澳门旅游攻略

This year, I plan to celebrate the Spring Festival in Shenzhen and the next stop for my Greater Bay Area trip is Macau. Traveling from Shenzhen to Macau is relatively convenient, so I am making arrangements for the trip. I’ve done some research and itinerary planning that can serve as a reference for those visiting Macau for the first time.

Read more »

UE中利用反射为资产建立属性缓存

In the previous article Design and Implementation of Resource Self-Correction in UE, I introduced the implementation plan of filtering using the asset inspection of ResScannerUE, followed by automated processing.

Normally, if you want to check a certain property within a resource, you need to load the asset and retrieve the object:

However, if you want to check the properties of many resources in bulk, loading resources one by one in this way takes a long time, especially in the absence of DDC, where loading resources triggers the construction of DDC cache, which is time-consuming and has a high performance overhead.

As the size of the assets increases, scanning all resources in a project completely can be extraordinarily time-consuming. Therefore, I wonder if it’s possible to implement a method that does not require loading resources but can still retrieve properties within resources.

After research, I found a clever way to achieve this by combining reflection, asset serialization, and the features of AssetRegistry. Moreover, this is a non-intrusive approach that does not require modifying any existing resource type code.

This article will introduce the implementation principles and analyze the related logic in the engine, as well as present the practical application of this mechanism in the project.

Read more »

UE中资源自修正的设计与实现方案

In a previous article, I introduced the implementation and efficiency optimization of multi-stage and automated resource checks using ResScannerUE in UE.

This already allows for very flexible configuration of resource checks and timely alerts, with very powerful rule expression capabilities. However, they are still limited to the stage of discovering problems for reminders; although there are constraints to prevent submission, manual processing is still required. Especially in cases with a large amount of existing resources, the manpower involved in manual processing is very time-consuming.

Based on this situation, I designed a mechanism for automating resource corrections that can automatically fix resources after rules are established, ensuring that all scanned resources are set to the correct state.

This completes the final piece of the puzzle in my resource check solution and can be applied throughout the scanning process as needed. This article will introduce its design concept and implementation mechanism, as well as some practical application scenarios in projects.

Read more »

UE插件与工具开发:j2的设计思路与实现

If I had to choose one recent experience in working with UE that felt the most meaningless and torturous, it would definitely be trying to find a resource in the ContentBrowser based on a long string path.

The inability to quickly jump directly to a directory or resource makes me feel like I’m wasting my life every time I have to navigate deeply nested folders one step at a time.

To address this pain point, I wrote a small tool that significantly alleviates this manual anxiety. I named it j2 (jump to), which is a minimalist ContentBrowser jump tool, open-source on GitHub: hxhb/JumpTo.

This article will introduce the usage of this project, the thought process behind conceptualizing the solution, and the step-by-step code implementation. Although the functionality itself is a very simple plugin, the discovery, analysis, and solution process for the actual pain points is worth documenting.

Read more »

基于Obsidian构建知识管理体系

In 2020, I wrote an article How to Build Your Own Knowledge System?, which mainly reflects on the daily accumulation of technology, leaning towards methodology.

This article will explore the possibilities of personal knowledge management from the perspective of tools and practical use, based on Obsidian, and attempt to integrate it with the Hexo blog. Of course, this preference for tools and practices has a strong subjectivity; this article is entirely based on my personal practice and experience; there is no best tool, only the one that suits you best.

Read more »