While the Unrealistic Style Guide will cover the naming of most standard Engine assets, it does not handle project-specific assets. Fortunately, Prefixed allows you to easily define your own asset naming rules or tweak pre-existing rules to fit your needs.
Elements of a Rule
You can define as many or as few rules as you would like in
AssetNamingRules.json. There are two required elements (and some optional elements) for each rule:
- Class - The asset class this rule will apply to
- Prefix - The prefix to use for this rule
The class is the type of asset that we want to define a rule for. For C++ classes, use the core class name without any modifiers. For example:
For Blueprint classes, just use the full class name as it appears in Editor.
The prefix is usually a short combination of letters that hints at the type of asset it represents. For example:
Prefixed does not prevent you from defining rules with conflicting or overlapping prefixes. It is up to you to make sure that each asset type has a unique prefix.
The suffix is optional. It should not be used as a substitute for a unique asset type prefix. Instead, it should be used to clarify sub-types of an asset type. For example, all Textures should have the same prefix (e.g.
T_), but depending on the type of texture it is (diffuse, alpha, metallic, etc.) it should have an appropriate suffix (e.g.
You do not need to restart the Editor every time you add, delete, or modify a naming rule. Prefixed detects these changes and prompts you to reload the rule set.
Click the option to
Update Rule Set to bring the Editor rule set up to date.