2 Answers
2

If you're looking to limit the size of your imported textures by default, there is no direct way of doing that, other than editing the max size after import. The default there will always be 1024.

You can however write a custom AssetPostProcessor which (despite its name) also has an OnPreprocessTexture method which you can use to set import settings. A very bare bones example would be something like this:

It basically divides by 2 the maximum texture size, so if you have a texture with maximum size equals to 2048 it will set to 1024, while a 512 texture in the same project will be set to 256. This is very useful to lower the memory usage.

The disadvantage of using OnPostprocessTexture in this case is that I must reimport the textures twice: the first will change the texture max size, and the second (with this piece of code disabled) will actually apply the new max size. This happens because we are setting the new size after the texture was imported, but it's the only way since there is no way to read a texture size in OnPreprocessTexture.