Unity's texture importer provide a list of default settings for manual editing. However, if you are trying to automate those importers, you need to go through
With those 2 structs, you would typically set them on the texture importer through an AssetImporter.
Setting up a scriptable import pipeline requires you know which settings to enable/disable. The struct just has a bunch of getter and setters and you'll need to know which settings to place. Without a visual GUI, this makes it cumbersome to visualize.
Provide a GUI similar to Unity's TextureImporter
. This allows the TextureImporterSettings
to
feel more familiar and allows developers to set up their pipeline visually. That is what this
repository aims to do.
On the left side of the screenshot is Unity's default TextureImporter. The right side of the screenshot
aims to replicate that same GUI but for the TextureImporterSettings
and TextureImporterPlatformSettings
structs.
It is still the developer's responsibility to set up their own Scriptable Import Pipeline. This
is not an architecture, it is only a GUI frontend to the TextureImporterSettings
.
You can use this GUI frontend for all instances of serialized TextureImporterSettings
.
Use TextureImporterSettings
normally in your project. Any serialized TextureImporterSettings
will be displayed with a custom
GUI in the inspector. When writing your custom importer, use the following APIs:
You can also use the TextureImporter
's API to copy to the structs first if you want to use some of Unity's default per import session.
Mipmap Limit Groups are not embedded in TextureImporterSettings
, so the GUI does not display an override for that. Your
Scriptable Import Pipeline should handle it.
importoverrides-demo.mp4
In the demo folder, you can see a Scriptable Object called Demo
.
- The Demo Scriptable Object only has the
TextureImporterSettings
variable. Instead of showing the default struct, it shows a GUI similar to theTextureImporter
.
You have a couple of options to install this package.
- Use OpenUPM
- Add this package's git url through the package manager
-
- In the toolbar go to Window
-
- Select Package Manager
-
- Click the
+
sign in the top left corner
- Click the
-
- Select
Add package from git URL...
- Select
-
- Download the zip and extract
com.initialprefabs.importoverrides
into your project manually.