Hello, I am trying to build my game for MacOS. The game has to be able to read files in specific folders in order to load levels, highscores, …
It is set up to look for a specific folder located in the same folder as the executable (that would be the .exe on windows for example).
I don’t possess a Mac, and thus know nothing about apps for MacOS. Where is that executable located in the files that result from a build ? (is it the .app folder, or a specific file in it ?)
On macOS, you shouldn’t change or add files in the app bundle. It’s common not to have write access to it and, if you ever want to use code signing, it will make the signature invalid and break the app.
Instead, any user data (save, highscores etc) should go into Application.persistentDataPath.
If you want to bundle some additional data with your build, you can use Application.streamingAssetsPath or Application.dataPath. Those paths shouldn’t be modified, so you might have to copy the resources to the persistent data path and change them there.
(The app bundle ist just a folder that contains the executable, libraries and all Unity build data in specific sub-folders. On macOS, the bundle appears like a file and normal users won’t now how to open it up.)
Sorry, I see this just now. Thanks a lot for the explanation !