Setting up bundled DotNet SDK
chmod: /Users/theuser/GitHub/UnrealEngine/Engine/Build/BatchFiles/Mac/../../../Binaries/ThirdParty/DotNet/6.0.302/mac-arm64/dotnet: No such file or directory
/Users/theuser/GitHub/UnrealEngine/Engine/Build/BatchFiles/Mac/../../../Binaries/ThirdParty/DotNet/6.0.302/mac-arm64
Engine/Build/BatchFiles/Mac/GitDependencies.sh: line 17: ./Engine/Binaries/DotNET/GitDependencies/osx-x64/GitDependencies: Bad CPU type in executable
Note, I had previously installed Visual Studio but took extra care on a second install to get the latest version that supports Apple Silicon which is here Visual Studio 2022 for Mac
If it helps, I’ve found a few problems and workarounds for building Unreal Engine from source on Apple Silicon. I’m using a Mac mini M2 I purchased specifically for making Mac builds for Steam. I cloned the UE repository and switched branch to 5.2.
My mini has a 512GB drive, so I tried putting the source on an external USB-C drive, but this didn’t work. I haven’t found a good solution; this appears to be a security issue. I had to move everything back to the internal drive for now.
The Setup.sh script fails to run at the Terminal with GitDependencies exiting with killed 9 status. Seems like it is trying to (correctly?) run the arm64 version of this executable, but it isn’t compatible with my system. I manually switched to x86_64 for the Setup.sh file execution, and all went fine (env /usr/bin/arch -x86_64 /bin/zsh --login). I then switched back for the remainder of the build process (env /usr/bin/arch -arm64 /bin/zsh --login).