Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Resolved Where to put dymanic asset folder for Mac?

Discussion in 'Editor & General Support' started by visca_c, Mar 9, 2022.

  1. visca_c

    visca_c

    Joined:
    Apr 7, 2014
    Posts:
    27
    I want to make an app that loads pictures from a fixed special folder, where the users can put pictures in that folder, and the program will loads them on start.

    On Windows, I made a folder named 'Pictures', which is inside the same folder with the .exe.

    But when I try to build for Mac, I noticed that the build is just one .app file, which Macs natively do not treat as a folder like it does on Windows. So now I'm wondering what's the best practice to put this 'Picture' folder for Mac. Do I put it inside the .app, as something like '.app/Contents/Pictures', and expect the user to be able to put pictures in there, or do I make a new folder that contains both the .app and the picture folder?
     
  2. visca_c

    visca_c

    Joined:
    Apr 7, 2014
    Posts:
    27
    I end up making a folder to contain the .app and asset folder.
    Directory.GetCurrentDirectory() will give the folder that contains the .app item on Mac, so using it to do relative path for dynamic assets works.