- Home /
Keep the link to a csv file on build
Hello, I need to use a csv file in my project, that file is saved in the Resources folder and is loaded in the project:
textAsset = Resources.Load("settings", TextAsset);
Until I'm in the editor I have no problems to use it but if I build the project the file is not in the data folder and I can't use it anymore (I also tryed to copy that file manually with no success), how can I use this csv also after build? Thanks
Answer by GameVortex · Oct 01, 2014 at 10:44 AM
The file will not appear in the Data folder after a build. Non of the files in your project will appear in the Data folder. They will all be built into unity assets. The files contained in Resources folders will be built and compressed into the recources.assets file.
Your csv file is still used in the exact same manner as before: by loading it with the Resources class.
Ok but I need to update it, I need to directly access the file to update it and change its values. It is possible? Thanks
Then you need to add the file to a folder in Unity named Strea$$anonymous$$gAssets ins$$anonymous$$d, and load it through the WWW class. Check out the documentation: http://docs.unity3d.com/$$anonymous$$anual/Strea$$anonymous$$gAssets.html
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Importing Assets after Build 0 Answers
Script to load csv after build 2 Answers
Does Unity cull away unused assets on build time? 1 Answer
Game Objects are not visible in build of my 2D Games 0 Answers