I’m having trouble creating a folder on the root of my phone or tablet, I can create one in windows, which is created in the root folder of my Unity project, but I want to create a folder on the root of a phone. Does anyone know how? I am using
using UnityEngine;
using System.Collections;
using System.IO;
public class Create_Directory : MonoBehaviour {
void Start () {
System.IO.Directory.CreateDirectory(“TestFolder”);
}
}
I have tried using Persistent paths like
dir = Application.persistentDataPath + “TestFolder”;
System.IO.Directory.CreateDirectory(dir + “TestFolder”);
etc. But I have no idea how to get this to the root of the phone and create a directory there.