I assume this can be done just asking before I attempt it at work tomorrow, I already have an editor scripts for other projects that checks if an imported file - on import only - is a texture, then checks its name to see if it contains ‘Normal’ and marks it as a normal texture.
Can I do something similar with Needle Import settings via Editor script to find out if a texture is called Normal/Metallic etc and change it’s compression type to UASTC otherwise set ETC1S?
Too often I have been in a hurry exporting a compressed glb from Needle for other things and realising I over compressed the textures
Sure, would be useful if I can editor script it up to automate what values are set per texture on import though, can send a sample of what I usually do
So if you have the TextureCompressionSettings component in your scene then it will choose uastc for normals automatically. If you override the TextureCompressionSettings and add it to your scene you get on export every used texture + slot and can return the compression type you want
I am using this for non-sub assets just regular textures from a GLTF + Separate file in my current workflows so each GTLF comes with a textures folder that has the raw textures in it. Would it work for that?
That is only good if I want all textures exported to use the same compression type, but in my case I want albedo to use ETC1S only and Normal/metallic maps to use UASTC so I want to script it in an editor script on texture import
Is there any example of how to call NeedleAssetSettingsProvider on texture import? I’m hoping to just set up an editor script to check the texture name for normal/metallic and set it there on import