Getting Started

July 8, 2020

·

Prefixed

Prefixed is an asset naming enforcer that can be used to keep your projects neat and organized. To get started, follow these steps.

Enable Plugin

The first thing we need to do is make sure that we have enabled the Prefixed plugin for our project. Open up the Editor, find the menu in the top left corner, and navigate to Edit->Plugins. You can find Prefixed in the Installed->Editor category. Click the checkbox to enable the plugin and restart the Editor.

Prefixed is enabled

Install Naming Rules

Next, we need to install our asset naming rules. Naming rules are read from all files with the .prefix file extension. This file can be placed in:

  • The {EngineVersion}/Engine/Config directory
  • Any {EnginePlugin}/Config directory
  • Any {ProjectPlugin}/Config directory
  • The {Project}/Config directory

Files will be read in the order listed above, and newer rules will override older rules. You can use as many or as few .prefix files as you want, but it is a good idea to place a Core.prefix file in your Engine config directory that handles standard Engine classes (Characters, Actors, etc.). This file will apply to all projects using the same Engine and can help ensure consistency. Then you can add additional files to plugins or your project to override Engine-wide rules or to add new plugin or project-specific rules.

A minimal rule set is packed into the Prefixed plugin's Resources folder. However, for a more comprehensive set of rules, check out the Unrealistic Style Guide.

Restart the Editor.

C:/Program Files/Epic Games/UE_4.25/Engine/Config/

Run the Linter

We are now ready to lint. Simply select the folders or assets that you would like to lint, right click, and click the Run Linter option. A dialog will pop up which will allow you to see the proposed rename, make any corrections, and apply the changes.

The linting dialog

If you get an error when selecting the Run Linter command, it's possible that your asset naming rules were loaded incorrectly. Check out this article to learn more about proper rule formatting and how to add your own rules.

And voila - you now have consistently named assets! Happy linting!



© Mowgl33 2020.