Skip to content

2.Architecture

1. File Notes

Depending on the UE setting, headers (.h) are placed in the Public folder, while implementation (.cpp) is in the Private file.

The file structure of the Public folder is shown below.

image-20220512110911312

__Rules

Files in the red box ending with Rules save the rules of their corresponding resources. View [Rule Sample] for feature details. (https://km.netease.com/wiki/1603/page/324208?parent_id=180609&wiki=1603&has_child=false).

EditorResCheckCommandlet

For background scanning of servers. Currently unavailable.

ArtEase

For communication with the ArtEase side to get rule settings (switch, whitelist, etc.)

Utilities

Contains various functions, including notification window, POPO help, save Python check and so on.

Upcoming functions that are unavailable on Python and require C++ can be seen here.

EditorResCheck.h/.cpp

The main part of the frame. See the frame description for details.

2. Rule Class

IRule is the Interface for all rules. All rules are implemented by reloading the RuleCheck function.

(View Rules Writing for details)

image-20220512111219109

Similarly, Python rules are also implemented by reloading RuleCheck.

3. Rule Container

IObjectRules is the container for rules, with type structure as follows.

image-20220512111630677

Basically, all existing UE resources have been classified and sample functions have been added. View [Rule Sample] (https://km.netease.com/wiki/1603/page/324208?parent_id=180609&wiki=1603&has_child=false).

4. EditorResCheckModule

Module includes a TMap, allocating resources to be checked. The overall check logic is implemented here.

For example, when a user saves a blueprint resource, it traverses IRule stored in Module -> FBluerprintRules(IObjectRules), and runs a check.

The correspondence between the rules and Object is stated in EditorResCheck.cpp

Example: When a UStaticMesh resource is saved, it traverses rules in FStaticMeshRules for a corresponding check.

image-20220512111714433