Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

How to save local files?

Discussion in 'Windows' started by bakno, Aug 7, 2013.

  1. bakno

    bakno

    Joined:
    Mar 18, 2007
    Posts:
    604
    Hi

    I am trying to create a folder within the "Application.dataPath" using the following command "Directory.CreateDirectory" but I receive the following error:

    "Access to the path 'C:\Users\User\Desktop\ProjectVS\Game\bin\x86\Debug\AppX\Data\Files' is denied."

    Should I use another folder or edit the manifest, and if the second option, what should I add to it?

    Thanks
     
  2. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    You need to use Application.persistentDataPath
     
  3. bakno

    bakno

    Joined:
    Mar 18, 2007
    Posts:
    604
    Thank you Ostwind

    It works!!! : )