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.
- Window stays outside the display when switching from multiple monitors to a single monitor
- The unused shaders are still being tracked when Asynchronous Shader compilation is enabled
- CIL Linker errors are thrown when building with IL2CPP/WebGL
- Some normal maps has ripple effect and appears to be lower in quality when using default compression settings
- <color=red><></color> does not work with 呸 symbol