Search Unity

Can't save txt file on Quest

Discussion in 'VR' started by CWatsonT2, Apr 1, 2020.

  1. CWatsonT2

    CWatsonT2

    Joined:
    Jan 9, 2019
    Posts:
    114
    I've tried a bunch of things but haven't been able to get a text file written to the quest. My code looks like this:

    _path = Application.persistentDataPath + "/123.txt";

    if(!File.Exists(_path))
    {
    File.WriteAllText(_path, "My string text");
    }

    This works on my computer but I don't get anything on the Quest. I've tried with write permissions as internal and external. When set to external I get the write permissions in the android manifest and a screen asking for permissions when the application starts. I accept that but it still doesn't write anything to the device that I can see. It also doesn't throw any errors when run. What am I missing here?
     
  2. CWatsonT2

    CWatsonT2

    Joined:
    Jan 9, 2019
    Posts:
    114
    This works you just have to restart the headset before the file becomes visible.