Editor 2022.3.26f1 on an M3 MacBook Pro
When I try to build for iPad, the Editor claims it doesn’t have access to it’s own project folder.
BuildFailedException: Player build failed: Internal build system error. BuildProgram exited with code 1.
System.UnauthorizedAccessException: Access to the path '/Users/jeg/Projects/Nuon Folder/A Passion Play' is denied.
---> System.IO.IOException: Permission denied
#1. This build used to work. It suddenly stopped working.
#2. Checked all permissions. Everything is R/W by owner, plus I’m running as Administrator.
I searched on this, and found that other people have encountered this error, but under different circumstances. What is going on?
First of all, don’t do that:
Do not run Unity as Administrator. This actually can be the reason as the OS has a security barrier so stuff from a lower level can not easily enter a higher privileged level.
Also make sure the files in the build folder are not still in use.
By that you mean your Mac user account is an Admin? That should be okay, Mac OS won’t run apps with admin privileges.
But if you “sudo” run the editor, just don’t!
Can you navigate to that folder with Finder? Can you create a new text file in that folder? And “jeg” is the name of the logged in user? Then that should work.
If you haven’t, try restarting your Mac.
I would check to see what user the editor process is running under just to be sure.
Restarting didn’t help. A ps command says Unity is running as me, which is an Admin account. Not sudo, I have a robot watching me type and it whacks me on the knuckles with a ruler if I type sudo (ow!).
Even worse, it doesn’t matter where I put the build folder, Unity complains that it can’t access the project folder, the project that it has no problem letting me work on.
Narrowing it down - it’s only this one project. I moved a couple more projects over, and they’re fine. That made me suspect the project settings, or that something was borked with one of the installed packages. But all those correspond to the working project on the Intel Macbook.
Except - when I open the project on the M3 Macbook, I get the following. Again, everything appears OK, proper packages are installed, XR manager is set up…
System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.OfType[TResult] (System.Collections.IEnumerable source) [0x0000d] in <1cfd929d26c0425584fbeebbe681e8ae>:0
at UnityEditor.XR.ARKit.LoaderEnabledCheck.UpdateARKitDefines () [0x00017] in ./Library/PackageCache/com.unity.xr.arkit@5.1.4/Editor/ARKitBuildProcessor.cs:322
at UnityEditor.XR.ARKit.LoaderEnabledCheck..cctor () [0x00029] in ./Library/PackageCache/com.unity.xr.arkit@5.1.4/Editor/ARKitBuildProcessor.cs:299
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes (System.Type[]) (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorAssemblies.cs:127)
One other note is that the AR template downloaded straight from Unity doesn’t compile. You’d think a template would work.
Well, that was excruciating.
It was the launch screen.
To be specific: that app uses a custom storyboard for the startup. This was no problem in the Intel Unity 2023, but in the M3 Unity 2023 it creates the error I posted about. It’s 100% demonstrable, I can switch the custom storyboard in and out to show it. Now to figure out another way of doing a launch screen.