|
I am trying to do a simple script that will export all textures from a selected model as PNGs. (Texture2D.EncodeAsPNG()) But I am hitting a brick wall with the following error: UnityException: Texture 'textureName' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings. I've tried to programatically setting it as isReadable = true I've also tried setting it as readable not programatically, but without any success. Also, setting them as readable would make them be readable in the runtime, which isn't what I want. Is there any way to do that? Thank you very much!!
(comments are locked)
|
|
After setting isReadable, do this:
That'll reimport the asset in a blocking way, meaning that you can encode to png, and then set back the isReadable setting as it was before changing it thank you very much, Mike!! It worked!! And even better, it will work when I reimport it as unreadable! Thanks!
Dec 25 '10 at 06:10 PM
Waneck
(comments are locked)
|
