- Home /
The question is answered, right answer was accepted
Can I extract or save textures?
Hi, I am in a pickle. I am working on a game, and the most important 2D texture of them all, I accidentally overwrote. I have recent builds with the correct texture in them, and can even build right now and swap out one of the sharedassets.assets files and the texture is back, but is there any way to get the texture out? I know I can't unpack a assets file, but is there a script that I can add to the object so that I press a button and it exports the diffuse map to disk? Because I can still do another builds and swap out the assets file and it will have the right texture. I really need help with this, using Unity 4 Pro.
Ok, problem solved in a way, I disabled DX11 and the resolution configurator and did another build, swapped the asset files, then ripped the textures with 3D Reaper DX. Still would be good to know if there is a way to do this with a script though.
Answer by Tarlius · Mar 15, 2013 at 04:56 AM
I believe this will help you. Just load the texture from the asset bundle, encode it then write it to a file. If the texture was compressed it there may be some loss when re-compressing it though. If this is the case you might be able to create an asset from the texture object, but I don't know if that would work...