- Home /
Question by
dansav · Oct 09, 2012 at 05:18 PM ·
assetbundlefilepngcopy
copy png from assetbundle into another folder
Is it possible to copy a png from an assetbundle into another folder or directory?
I know how to copy a file using the IO commands but not when it involves an assetbundle. How would I change this code to deal with the bundle. Or is there an easier way?
import System.IO;
function getandcopyPropFile(){
var download : WWW;
var propbytes:byte[];
var url = "http://www.someurl.com/info.txt";
download = new WWW (url);
yield download;
propbytes=download.bytes;
Debug.Log(download.data);
File.WriteAllBytes(Application.streamingAssetsPath + "/propinfo.txt", propbytes);
}
Comment
Your answer
Follow this Question
Related Questions
copy downloaded png to Documents folder? 0 Answers
Application.CaptureScreenshot() on iOS not creating file. 2 Answers
Error copying PNG 1 Answer
Android Download asset bundle locally 0 Answers
Save/Copy a .txt file a runtime 1 Answer