Change saved texture assets' compression type per platform

I am programmatically creating and saving texture assets (Texture2DArray and Texture2D). They are created in editor of course, but used for mobile. The problem is that in editor they are created as DXT type textures. And of course this doesn’t work on iOS. I added some code to compress to PVRTC when switched to iOS platform, but now they won’t show in the editor because PVRTC is not supported in the editor.

How can I have programmatically created texture assets work in both the editor and iOS? Using uncompressed textures is not an option.

Perhaps a custom build step that checks if it is in iOS and reimports those textures in the new format? Then revert them afterwards…

Yeah I was thinking about that, but it seems very odd for something that unity should already have built in. Plus it’s hard to test as I gotta wait for the project to compile. Which takes a long time.