Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by arkano22 · Mar 02, 2013 at 10:30 AM · iosbugapplicationpc

Application.persistentDataPath is empty

Application.persistentDataPath is "" in some devices. I´m doing a simple:

     Debug.Log(Application.persistentDataPath));

And in some iOS devices and PCs, it comes out as "". In other devices, it works fine. Has anyone experienced this before? It´s getting my users pretty upset, as some of them just cannot save anything they do in my app.

Unity 3.5.6f4

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image josszp · Mar 17, 2014 at 11:51 PM 0
Share

I've got the same problem, the difference is for the same mobile and the same version, sometimes is ok, sometimes the Application.persistentDataPath return empty, so why??? it is annoy, make me creazy all day, so help me pls!

avatar image infosekr · Sep 05, 2015 at 12:16 AM 0
Share

Still see this problem in Unity 5.1.2. I see some Android devices get a blank Application.persistantDataPath via my analytics. Has anyone figured out a workaround?

avatar image TheGering · Sep 11, 2015 at 10:20 AM 0
Share

I have the same Problem with Unity 5.1.3. Anyone have a solution to this?

4 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by infosekr · Sep 05, 2015 at 12:17 PM

Seems like the best approach is to avoid Application.persistantDataPath altogether, and write a Java plugin to get the Internal storage directory directly from the OS. Seems that the persistantDataPath can change based on if you have an SD card inserted or a USB cable plugged in anyway, not to mention why it returns an empty string for some users in particular situations.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by haochen1991 · Nov 19, 2015 at 07:40 AM

Hi,I‘ve got the same problem,and then I slove it by rebuild the "ProjectSettings.asset"file,It worked.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Marc-Uberstein · Feb 29, 2016 at 08:19 AM 1
Share

How did you rebuild the projectsettings.asset file?

avatar image
0

Answer by sandolkakos · Aug 21, 2018 at 01:43 PM

My problem was solved when I noticed the carriage return (/r) character in the ProductName of my project. Look here: https://forum.unity.com/threads/app...-string-on-some-machines.384000/#post-3604512

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by gvergidis · Aug 21, 2018 at 02:15 PM

Try using this instead :

 System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

TimeSpan error on ios platform 2 Answers

Unity bugged after Ios Build 0 Answers

Enable iOS PlayerSettings on Windows? 2 Answers

UnityAction with method name with "Play" inside don't execute on iOS 0 Answers

Splashscreen problem on iOS 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges