- Home /
Can you set Read/Write on an image in an Editor Script?
Can you set the read/write of an image in an editor script? Can you set the "Generate Mip Map" to false using the editor script?
I am generating an image in editor-scripting that I need to set these properties. At the moment, I'm hand editing them but it would be nice to set these in my script as a part of my scene generating pipeline.
Thanks, Jeremy
Answer by Bunny83 · May 03, 2011 at 09:46 PM
That are all properties and options of the TextureImporter. The actual Texture doesn't have such options. A Texture just have the texture-data which may contains mipmap data as well. If you used SetPixels to create your texture you can define your own mipmap data or when applying the changes use Apply(true).
If you just want to control the import-process create an AssetPostprocessor and use AssetPostprocessor.OnPreprocessTexture.
Your answer
Follow this Question
Related Questions
Editor class "Texture Importer" question (applying settings to multiple texture assets). 2 Answers
EditorWindow texture effected by Playmode Color Tint 1 Answer
AssetBundle to prefab => meshes/textures missing 1 Answer
Editor Script Selection thinks Sprites are Texture2Ds. 2 Answers
How to stop gradient banding? 2 Answers