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.