- Home /
How to refresh Assets Folder in Unity Builds?
I am trying to refresh assets folder in Unity builds. Using UnityEditor is not suitable for me, it is editor script, cannot be used in builds.
Basicly, I am creating XML file in runtime. Therefore, I need to refresh assets folder to get the created xml file.
Is there any other idea about it?
Thanks
Answer by GameVortex · Jan 20, 2014 at 09:11 AM
You are saying you need this to not be an editor script because you need it to be in the build. The asset folder is not accessible in a build, so you can not create files there at runtime. No reason then to refresh it. You most likely want to store files at a location such as **Application.persistentDataPath** and load them using the **WWW** class.
But if I have misunderstood and you do want to just refresh the asset folder, then use **AssetDatabase.Refresh**.