- Home /
How can I link my game build to files in the Resources File?
Currently, my game engine reads text files from Resources/Story in order for the game to progress. However when I built the game, the output.log displayed this:
ERR! File C:/Users/[Username]/AppData/LocalLow/CompanyName/Game/Resources/Story/chapter0.txt does not exist!
I have noticed that the actual resources folder is not included in the actual build, so I assume that the resources folder is either compressed or not included in the build. For extra context, this game will use several text files to read off of for dialogue and events. Do I have to export the Resources folder into the buildpath?
Answer by gjf · Dec 01, 2020 at 04:05 PM
Check that you're using the correct filename/path. Something like:
TextAsset chapter = Resources.Load<TextAsset>("Story/chapter0");
should do the trick...
Your answer

Follow this Question
Related Questions
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
How can I stop the variable values reverting to its default values after being built? 1 Answer
Failed to re - package resources Unity 5.4.3f1 0 Answers
Unable to list target platforms. When I try to build to Andriod on Mac 5 Answers
Build error for android Gear Vr Assembly-CSharp.dll could not be found on OSX 2 Answers