Search Unity

OSX High Sierra persistentDataPath

Discussion in 'macOS' started by cocacough, Dec 10, 2018.

  1. cocacough

    cocacough

    Joined:
    Jul 1, 2015
    Posts:
    78
    Hi,

    I seem to have a problem locating persistentDataPath on my Mac.
    My game is saving/loading fine with the persistentdatapath but I can't seem to find the folder anywhere.
    I checked both ~/Library/Application Support and ~/Library/Caches folder but I can't find any folder related to my game.
     
    Last edited: Dec 10, 2018
  2. cocacough

    cocacough

    Joined:
    Jul 1, 2015
    Posts:
    78
    Ok I found where is it storing. Apparently it saves in the User's Libary folder not ~/Library/.
    I meant this folder: ~/Users/<user>/Library/

    Is there a way I can change that or I have to change where I'm saving. Because I have to make it work with Steam's Auto-Cloud service which asks me to specify a directory.
     
    Last edited: Dec 11, 2018
  3. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    517
    Just an FYI that ~/ is the Unix shorthand for the user’s home directory. So ~/ is equal to /users/<logged in user>.

    Now that is out of the way, you can save anywhere you have permissions to using System.IO classes. The persistentDataPath is a cross-platform convenience that Unity provides.
     
    SweatyChair likes this.