OnPreprocessTexture: doesn't keep org file size

Hi,

I like to keep a texture file a 4k for processing purposes. Although I override the import setting via AssetPostprocessor, it still gets scaled down.

The following is inside AssetPostprocessor::OnPreprocessTexture

	        TextureImporter importer = assetImporter as TextureImporter;
			importer.textureType = TextureImporterType.Advanced;
			importer.textureFormat = TextureImporterFormat.RGBA32;
			importer.npotScale = TextureImporterNPOTScale.None;
			importer.wrapMode = TextureWrapMode.Clamp;
			importer.maxTextureSize = 8192;
	        importer.mipmapEnabled = false;
			importer.isReadable = true;

Org. texture is 4096 x 3072. It get’s scaled by half. I am on MacbookAir but SystemInfo.maxTextureSize reports that 4k texture should be fine.

Any idea why it doesn’t work?
thx

Ok, I found the issue, I think. I had the Flash Platform active - switching to Desktop made it work. I think this is maybe a nice idea to enforce restrictions but the context is wrong. The editor and asset pipeline are so much more than the engine - we may use raw input data and process it to our liking before inputing it into the authoring process. In that case such restrictions are counter productive and especially annoying when you don’t have the option of control over it.

Sometimes trying to be simpler makes things more complicated. We really should have full control in this area (e.g. add a property IgnorePlatformRestrictions or the like for this example).