Force style of Application.persistantDataPath on Mac

Hi,

like probably most of you, I use Application.persistantDataPath for retrieving the file path my game saves its savegames to.
Now, I don’t know why, but on Mac my savegames are written to the Library in the following manner: ‘~/Library/Application Support/unity.company-name.product-name/’ .
Unfortunately, this is a problem, since my client (a big publisher) requires me to save in the following location: ‘~/Library/Application Support/company name/product name’ .

This shouldn’t be a big deal, for the documentation on Application.persistantDataPath says: “In recent Unity releases user data is written into ~/Library/Application Support/company name/product name. Older versions of Unity wrote into the ~/Library/Caches folder, or ~/Library/Application Support/unity.company name.product name.

So, presumably - since I’m using a recent release of Unity [5.4.3f1] - Unity already should save into the desired location, but unfortunately it still saves into this weird unity.company-name.product-name/ folder, even on Macs that run my game for the very first time.

Do you know of any way to force my game to save its savegames into the folder ‘’~/Library/Application Support/company name/product name’’ ?

Well, you may always retrieve the path using Application.persistantDataPath, then trim it and rebuild the path you want.

		if (Application.platform == RuntimePlatform.OSXPlayer) // check your on running a Mac build
		{
			if (float.Parse(Application.version) <= 6.7f) // check if older version of Unity
			{
				string path  = Application.persistentDataPath;
				Debug.Log(path);
				char[] charsToTrim = {'/'};
			string [] splittedPath = path.Split (charsToTrim);
			path = "";
			for (int i = 0 ; i < splittedPath.Length-1 ; i++)
				path += splittedPath *+ "/";*
  •  	path += "CompanyName/Product Name";*
    
  •  		Debug.Log(path);*
    
  •  	}*
    
  •  }*