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 »

循迹旅行:香港旅游攻略

Shenzhen and Hong Kong are separated by just a river. Although I had long planned to visit Hong Kong, I was unable to do so for the past two to three years due to the pandemic. Now that the pandemic restrictions have eased this year, passing between Hong Kong and the mainland has also become relatively convenient, so I’ve included a trip to Hong Kong in my schedule.

I went to Hong Kong for a weekend trip with my wife. Before we went, I made some travel plans and arrangements that can serve as a reference for first-time travelers to Hong Kong.

Read more »

UE构建提升:优化远程构建IOS的实现

Remote building is a very convenient way to package iOS in UE, allowing code compilation only on a Mac without COOKing resources, which greatly reduces the hardware requirements for Mac.

Moreover, Macs are quite expensive. In a traditional setup, if multiple independent iOS package build processes are needed, it usually requires purchasing several separate Mac machines for deployment, leading to high hardware costs.

Additionally, the iOS development environment often needs to be updated with iOS system iterations. Every year at WWDC, a new version of iOS is released, requiring support from the latest XCode, which in turn depends on the latest MacOS—a nested chain of dependencies. If the number of Mac build environments increases, updating the build environments of these machines also becomes a cumbersome repetitive task.

Remote building for iOS can effectively solve this issue. A single independent Mac can simultaneously support multiple iOS build processes, and if an update is needed, it only needs to be handled on one machine. Furthermore, the time it takes to compile code is relatively fixed, and incremental compilation can be performed. In theory, as long as not all machines execute a full compilation at the same time, the performance pressure on the Mac won’t be that great.

There are also articles on enabling remote building for iOS in the blog: UE Development Notes: Mac/iOS Edition, which can be referred to for basic configuration.

However, the default implementation of iOS remote building in UE also presents several issues in actual use, failing to achieve a fully automated process from deployment to building. This article aims to optimize the pain points of remote building in real project applications.

Read more »

循迹研究:利用AI助力生活及开发探索

To do a good job, one must first sharpen their tools! AIGC tools represented by ChatGPT and Stable Diffusion have emerged, and the AI wave is sweeping across various industries. As developers, how to leverage AI capabilities to improve efficiency in tasks is a question worth studying.

It is crucial to note that the content generated by GPT may not be entirely accurate and can contain inaccuracies. However, its potential lies in the possibility of achieving a general-purpose AI assistant. No one can possess expert-level knowledge in all fields, but effectively utilizing GPT in unfamiliar domains can significantly lower the entry costs.

In this article, I will introduce some cases of using GPT to assist in work, life, and learning, as well as explore application scenarios for secondary development using the GPT API. At the end of the article, I will share some Prompts I use and recommend some useful GPT tools, as well as a solution for encapsulating Azure OpenAI services using Cloudflare Worker.

Read more »

DevOps:虚幻引擎的CI/CD实践

DevOps is a philosophy based on automation for Continuous Integration (CI) and Continuous Deployment (CD), optimizing all aspects of development, testing, and operations. It emphasizes the integration of software development, testing, and operations, reducing communication costs between departments or processes to achieve rapid and high-quality releases and iterations.

Although the development situation in the gaming field differs significantly from traditional internet development, leveraging the concept of DevOps to integrate all production elements of a project into automation can greatly enhance efficiency.

This article will introduce the basic concepts of automation in UE and share some of my attempts and actual engineering practices regarding automation builds in Unreal Engine.

Read more »

循迹研究:在复杂的世界中寻找确定性

Recently, there is often a strange sense of anxiety. After a period of self-observation and reflection, I believe it is necessary to confront these issues and attempt to provide answers.

This article is a thought experiment that examines and analyzes the current state of life and its problems, summarizing the ideological tools for guiding life and work. As a personal methodology, it contains a large amount of subjective content.

Read more »

资源管理:UASSET资源加密方案

In game project development, a large number of developers from various aspects such as development, art, planning, and outsourcing will be involved. For reasons of resource security and information confidentiality, complex permission controls and synchronization logic are usually implemented.

However, leaving aside permission control and focusing on the resources themselves, in UE, resources are upward compatible, meaning resources can be opened directly with the same version engine or a higher version engine. This means that distributed resources can be used directly in other projects. Therefore, ensuring the security of resources during the development phase is a key focus.

This article provides an idea for encrypting the original UASSET resources in the project and introduces the basic principles that can be used for resource encryption. However, publicly disclosing the specific encryption implementation would be akin to running naked, so this article will only provide an analysis of the uasset resource structure and ideas for implementing encryption, but will not provide specific implementation code.

Read more »