A plugin that validates settings for texture assets in Unreal Engine.

What can it do?

  • Throw errors when texture size, texture group and other properties do not match customizable rules.
  • Automatically set default values for new textures upon import.
  • Set different validation rules for textures with different prefixes, or for different folders within Unreal.
  • Throw errors when users import textures without setting the Data Source Folder in their Editor Settings.

Usage

Once installed, open Project Settings > BUI Validator.

Here you can set up validator groups, that consist of match conditions and rules to be applied to those matches.

Settings example

Settings

Match Conditions

For a rule to be triggered, all conditions of the match must pass.

  • Texture groups: Match textures with any of the texture groups.
  • Prefixes: Match textures with any of the asset name prefixes.
  • Paths: Match textures in any of the asset directories.

Validator Rules

Each rule allows multiple values for a given setting. For example a texture could be allowed to be within World or UI. To pass, the asset must match any of the values.

  • Texture groups: Textures must have one of the specified Texture Groups.
  • Compression Settings: Textures must have one of the specified Compression Settings.
  • Pixel Formats: Textures must have one of these Pixel Formats
  • Mip Gen Settings: Textures must have one of these Mip Gen Settings
  • Prefixes: Textures must have one of these prefixes.
  • Texture Size: Textures must pass these size requirements. Size requirements are "Multiple of Four" or "Power of Two"
  • Paths: Textures must be within this path in Unreal.
  • Require Data Source Folder: Require that the Data Source Folder be set in Editor Preferences, and that assets are imported from there. This is to aid reimporting between team members.

Auto-apply settings to new textures

Validator Groups have an Apply On Import option. When checked, any newly-imported assets that match the group will have some rules automatically applied to them.

Prefix, Texture Size and Path rules are not applied on import.

Running Validation

Whenever UTexture2D asset is saved, the rules in Project Settings are applied. If the asset does not pass, an error is shown.

Failure example

Installation

  1. Download the zip or clone the Github repository into YourProject/Plugins/BUIValidator/
  2. Add the following to the end of your .uproject file, inside the { }
     "Plugins": [
         {
             "Name": "BUIValidator",
             "Enabled": true
         }
     ]
    

Download

The project is on Github

License

CC0

Contact

If you find it useful, drop me a line @_benui on Twitter.

benui.ca

Posted: