Search Unity

Question Can i create a directory in Hololens 2?

Discussion in 'AR' started by danchavil, Oct 10, 2022.

  1. danchavil

    danchavil

    Joined:
    Jul 12, 2018
    Posts:
    32
    Hello everyone,

    I have a project that needs to download files and load them locally in my Hololens 2. I try to create a directory with the following code:

    Code (CSharp):
    1.         string path = Application.persistentDataPath;
    2.         debug.text = path;
    3.         if (!Directory.Exists(path))
    4.         {
    5.             Directory.CreateDirectory(path);
    6.             debug.text = "success";
    7.         }
    but don't work.
    My question is, can I create folders or directories in my hololens 2 and download files there?? and whether is possible, where could I find an example of directory creation??
     
  2. davidmo_unity

    davidmo_unity

    Unity Technologies

    Joined:
    Jun 18, 2019
    Posts:
    99