- Home /
Copy the file from assets and paste it out side the assets folder
Hi Every One,
I have a doubt with assets exporting. I have copied some word file into my assets folder, at the run time i need to copy that file and paste it out side where i want in the system or outside the assets folder.
I don't know is this possible or not in unity,
So help me to do this.
Thanks.
Edit: For a built game (not unity editor script), use C#'s File.$$anonymous$$ove()
or File.Copy
http://msdn.microsoft.com/en-us/library/system.io.file.copy(v=vs.71).aspx
You can provide a relative path (relative to your project root) or an absolute path.
for example, to copy a file from your assets folder:
File.Copy("Assets/$$anonymous$$yPicture.png", "Assets/$$anonymous$$yNewPicture.png");
You'll need to add using System.IO;
i could not able to derive this Fileutils function in my script. I used all header functions but i did not get that. i use this headers:
using UnityEngine; using System.Collections; using System.IO; using System.Collections.Generic; using System.Text; using System.CodeDom.Compiler; using System.Text.RegularExpressions;
Your answer
Follow this Question
Related Questions
How to import the object from server to unity 2 Answers
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Storing a part of a complex asset in an asset bundle 1 Answer
Can MonoBehaviours be partitioned into different assetBundles? 2 Answers
Is it sensible to build an assetbundle for each texture/mesh? 1 Answer