I’ve been having some problems reading from a text file that is included in the project, because I can’t figure out how to do it
I have text file in the root of my project. When playing in the editor in Windows everything works fine. When trying to play a build on an Android device, the file can’t be found.
You should probably put the file in the streamed assets folder. I believe this makes it so that it is stored inside the apk itself.
Or you can store it in the resources folder, which allows you Load the resource at runtime and since it is a text file you can then read the text file itself.
Thanks for clearing that up for me. I’ve got it working now. For anyone else looking at this in the future, keep in mind that you shouldn’t specify the extension of the file in the resources folder. “readme.txt” doesn’t work, but just “readme” (obviously) does.
Wonder what is the oldest comment you ever posted that I liked. Gotta be pushing a decade Eric. My shocking memory (and need to wear 17 other hats) doffs a dusty cap
EDIT: You would have loved the streamerReader implementation I just ripped, reading hard coded names WITH hard coded paths into a list of strings (that didn’t even point to the right place when built) - that is wiped 10000 times and one word is chosen from it on each cycle…