I have the same issue running 2019.3.6.
UnauthorizedAccessException: Access to the path “C:/dev/unity/projects/EmptyProject/ios” is denied.
Build completed with a result of ‘Failed’
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
I am running into this error on a Windows 10 machine, build 1909.
This happens when I create a new project, then try to build for iOS. The build proceeds for a while, creating some files in the specified output directory, then runs into this error and deletes the directory.
I can usually build without an error after I reboot, at least once, sometimes twice. But then it starts failing after that.
Here are the details of what I have tried so far:
I can get it to happen by creating a new project, then trying to build for iOS into an empty directory. I have reproduced it in the following versions:
2019.3.6
2019.3.3
2019.2.21
I have tried it in 2019.1.10 and it builds fine.
For version 2019.3.6 I’ve tried:
Building to two different local drives with wide open permissions. There is plenty of disk space available on each volume. It fails.
I have two nearly identical machines installed at two different locations, with nearly the same software installed on each. 2019.3.6 works fine on one, but not the other.
On the machine that fails:
I have booted into safe mode and tried the build. It fails.
Under normal boot scenario, I have shut off all startup items, shutoff Windows defender and firewall, and it still fails.
I even went through task manager, comparing machine to machine and killing any processes on the failing machine that weren’t running on the working machine. It still failed.
The working machine has build 1903 of Windows 10, and the failing machine has build 1909 of Windows 10. Unfortunately I can’t rollback the 1909 version because I updated it more than two weeks ago (Windows won’t allow rollbacks after a certain period of time).
I’m thinking it’s something in my environment that is either just outright causing the problem or triggering a bug in Unity. But I can’t isolate it.
So right now I’m stuck rebooting every time I want to build for ios. It’s a bit of a drag.
Anybody out there run into this and find a solution or a workaround? (besides rebooting every time I want to build)
Can anybody at Unity help?