Search Issue Tracker
Fixed in 5.6
[macOS] Application.persistentDataPath returns Library/Caches instead of Library/ApplicationSupport when cache folder is present
When cache folder is available, Application.persistentDataPath incorrectly returns its location instead of Library/ApplicationSupport.
Steps to reproduce:
1) Open the latest attached project (898217_macOSDataPath.zip).
2) Assets > Build AssetBundles.
3) Build the project for macOS.
4) Run the build.
- Application.persistentDataPath is printed on the screen. Notice that it points to ~/Library/ApplicationSupport/<companyName>/<productName>
5) Press 'Load AssetBundle' button.
- After a couple seconds, a sphere appears in the scene. Cache folder is generated in ~/Library/Caches/.
- Now Application.persistentDataPath points to ~/Library/Caches/unity.<companyName>.<productName>
6) Press 'Delete Cache' button.
- The cache folder is deleted.
- Application.persistentDataPath points to Library/ApplicationSupport again.
Expected: Application.persistentDataPath always points to Library/ApplicationSupport.
Actual: Application.persistentDataPath points to Library/Caches when there is a cache folder available.
This does not reproduce on Windows.
2017.1.0a6, 5.4.5p1, 5.3.8f1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [Universal RP] Missing Camera cannot be removed from Camera Stack after scene is saved
- Game View focus is lost when entering Play mode with maximized Game View (either by Shift+Space or options->Maximize)
- Switching refresh rate without switching resolution or fullscreen mode doesn't work
- [iOS] [IL2CPP] crash on il2cpp::os::Image::Initialize() on Application launch
- [iOS] crash when Notification with Data parameter set to null is pushed due to uncaught exception 'NSInvalidArgumentException'