I am currently developing an application for VisionPro that needs to store a temporary file on the device.
using System.IO;
var filename = new String( "myfile.txt");
var dirPath = new String(UnityEngine.Application.dataPath + "/");
FileStream outfile = new FileStream( dirPath + filename, FileMode.OpenOrCreate);
This leads to the following exception in the FileStream constructor:
System.UnauthorizedAccessException: Access to the path "/private/var/containers/Bundle/Application/########-####-####-####-############/myapp.app/Data/myfile.txt" is denied.
Do I need to request additional permissions? How do I do this on VisionOS?