- Home /
 
 
               Question by 
               theUndeadEmo · Aug 30, 2013 at 11:05 AM · 
                exportfilepng  
              
 
              Export a png from texture2D
Hi,
i am basically combining all the textures into one but also need to export the texture file out.
this was working before but no longer does, probably because i updated to unity v4 (need this to work for editor,android, iphone and webplayer
 newTexture.Apply ();
         
         byte[] bytes = newTexture.EncodeToPNG ();
          System.IO.File.WriteAllBytes (Application.dataPath + "/../testscreen-" + ".png", bytes);
 
               ERROR = System.IO.File' does not contain a definition for `WriteAllBytes'
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by theUndeadEmo · Aug 30, 2013 at 12:48 PM
ok from some looking around IO does not work for web player
Your answer