Hi all. I've now finished building an app and am now running into a problem I wasn't expecting. My method for saving progress in the app is through a bunch of txt files, and using File.ReadAllLines and File.WriteAllLines etc. However, upon building the app for both Windows and Mac, the app cannot find these files.
I've done research on this, but not really understanding what the solution to my issue could be. I'll first mention that the user HAS to have access to these text files. Basically whenever I update the app, the user will copy their data directory from the old version of the app to the new version of the app. I've seen people mention to use Resources.Load, which I'd prefer not to do unless it's the only other option, and I don't know how I'd save the txt files from there. I've also seen people mention Application.dataPath which just doesn't work. It still can't find the files.
What does work currently is if I have the exe file and the App_Data folder in the root app directory. This is okay for Windows, but considering the Mac build is built completely differently, I don't know how I'd go about it for that. And again, I'll need the user to be able to access their database folder to transfer it across versions.
Anyone know a possible solution to this with how I've built the database?
↧