I try to create a folder in the internal memory android, but after I build an app in unity then run an app on android, I get the exception:
"unauthorizedaccessexception access to the path is denied"
void Start()
{
//Create cashe
AddCacheAtPath("cashe");
}
private void AddCacheAtPath(string path)
{
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
Cache newCache = Caching.AddCache(path);
//Make sure your new Cache is valid
if (newCache.valid)
{
//If you wanted to set your newly created cache to the active cache
Caching.currentCacheForWriting = newCache;
}
}