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 standard Editor config files (e.g., BaseEditor.ini, DefaultEditor.ini) in the order specified here: Unreal Engine: Configuration Files.

It is a good idea to place rules that handle standard Engine classes (Characters, Actors, etc.) in BaseEditor.ini, located in the Config folder of your Engine installation. These rules will apply to all projects using the same Engine and can help ensure consistency. Then you can add additional files to DefaultEditor.ini in your project to override Engine-wide rules or to add project-specific rules. Project-specific settings can be modified in the Prefixed section of the Project Settings menu.

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.

As of v1.1.0, you can simply navigate to the Tools menu in the main viewport and select the Install Default Rules action. This action will download the latest rule set recommended by the Unrealistic Style Guide and install it to your Engine's BaseEditor.ini config file.

Restart the Editor.

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!



© 2021 Mustafa Moiz.