Texture Import Settings Applier

A tool that allows you to optimize your texture import settings easily.

What is the Texture Import Settings Applier?

It is a tool that allows you to set specific import settings to the textures inside your project that match a certain rule which helps reduce build sizes and load times. Using this tool you can configure rules that can be applied automatically or manually to entire folders if need be.

Using the Texture Import Settings Applier tool

Once you've imported the SDK you can find the tool in the Trail window entry as seen below:

The Trail menuThe Trail menu

The Trail menu

Click on the Texture Import Settings Applier option and the below window will appear:

The first time you launch the Texture Import Settings ApplierThe first time you launch the Texture Import Settings Applier

The first time you launch the Texture Import Settings Applier

Click on the Create Texture Import Settings Applier; this creates an asset in the Trail SDK folder that will contain all your different rules.

After creating the tool's assetAfter creating the tool's asset

After creating the tool's asset

The next step is to create a rule to apply to your textures. Click on the Add new applier rule:

A new rule created.A new rule created.

A new rule created.

Now that a new rule is created, you can now modify the import settings in a single location (instead of hunting for them everywhere). You should be familiar with most of these settings -- they are Unity's import settings. However, under "Advanced" there is a new option that allows you to scale your source assets which in turn enables you to use Crunch Compression on textures.

🚧

Scale source file to closest multiple of 4

This option modifies the source files (assets) directly and normally would break all references to the affected asset. The way the Texture Import Settings Applier tool modifies the asset is by modifying it from Single to Multiple, This forces Unity to "technically" create a new copy of the source file which in turn breaks all references to the asset. To avoid this from happening you must click on "Build Texture References Database" before you apply your rules that use this option.

The last thing that is not part of Unity's default import settings is the "Regular Expression Patterns" section. This allows you to pick specific assets only in your projects to apply the rule to. The Test regular expressions button will print the result of your typed in expression to help you debug and confirm the expression. Below you can find an example of a regular expression that limits the rule to only assets within the "Assets/Sprites" folder.

An example of an expression to limit the assets the rule can apply to.An example of an expression to limit the assets the rule can apply to.

An example of an expression to limit the assets the rule can apply to.

After you've set all the options as you see fit, you'll need to click on Apply. In case source files will be modified you will receive a message similar to the below:

Warning to let you know that references may break and you need to build the database references before accepting.Warning to let you know that references may break and you need to build the database references before accepting.

Warning to let you know that references may break and you need to build the database references before accepting.

If you haven't built the texture references database, it is recommended you do so now. If you did that already, then you can click Apply anyway and this the rule will be applied immediately to your projects. Depending on the number of assets that you have and the rule's expression, this may take a few minutes.

Here is an example asset before the rule was applies:

The beforeThe before

The before

Here is the same asset after the rule was applied:

The afterThe after

The after