Page 1 of 1

Can't save on D drive

Posted: Mon Nov 04, 2019 6:20 pm
by Digital Wizards
I'm doing a tool, and I need to save to any computer drive (PC)

string path = "D:/Test.csv";

ES3Spreadsheet sheet = new ES3Spreadsheet();
sheet.Load(path);
if (sheet == null)
Debug.Log("sheet == null");

for (int col = 0; col < sheet.ColumnCount; col++)
Debug.Log(sheet.GetCell<string>(col, 0));

I got this error: UnauthorizedAccessException: Access to the path "D:" is denied.

Any idea? I'm using Unity 2019.2.9f1 Thanks, !

Re: Can't save on D drive

Posted: Tue Nov 05, 2019 6:17 pm
by Joel
Hi there,

This means that the application doesn't have permission to write to that location. I would check your folder permissions and firewall settings to ensure that it has permission to access the D drive. Note however that the only place an application is guaranteed access to is the path defined by Application.persistentDataPath.

All the best,
Joel