This works, it saves and loads the data just fine. However, I would like its data to be stored within the project’s build folder (So it is easy to access/edit outside the program, and its data is saved in the project itself, not the local device).
What is the best path to use/ way to go about this? I am on Windows, but a solution that works cross-platform would be preferable. I understand this is not good standard practice, but it would be best for the given situation.
Thanks for your help and have a great day!
There is none. You should use the persistentDataPath. They are giving it for you to use it.
It is a very rouge behavior and suspicious to write inside an application folder. Especially on Windows.
It sounds like you might want to make this an Editor extension, only able to save and load to the Assets/ folder. You could also make an Editor script that ran some other tool, which can write pretty much anywhere you want within your Editor-using credentials allowed.
Once you Build, the resulting files of the Build are essentially completely divorced from Unity and no longer have any connection to the project, the project folder, or anything else. It’s just an executable. To have a capability to write anywhere beyond the persistentDataPath would be suspicious, and the Unity runtimes actively work to avoid that.