Metal shader directory error when opening UE4Editor

Hey all. I appreciate that this section may not be relevant, as it seems from reading other questions that it’s more about packaging and deploying apps generated from the editor, rather than the editor itself. I’ll post here anyway, but please let me know if I should be posting elsewhere.

Essentially, I’m packaging the Unreal Editor for deployment to about 100 or so lab Macs within a university. These Macs have multiple users, so I’m trying to capture and package the editor in such a way that it’ll work for any users logging onto a Mac. So far, I’ve managed to wrangle it so the editor is installed to it’s default directory (/Users/Shared/Epic Games etc) and the editor works when opened over multiple different logins.

However when I have Xcode installed on the system, I get an error message when opening the editor that states “could not access directory required for debugging optimised metal shaders”. My question is, does anyone know what directory this is referencing? If I knew this, I could change the permissions on the directory as necessary and all would be good.

It’s worth noting that the editor log in Console doesn’t show any access errors, so I guess the next question would be how do I enable verbose logging within the editor?

Thanks!

I’m experienceing the exact same thing on a new mac with Catalina 10.15.5 and unreal 4.25.3 with a clean install of Unreal and I’ve installed Xcode also

I think this issue has been resolved; it seems to be an issue with cache folders that are created within /private/tmp on the Mac, and the permissions that they’re given. Have a look in /private/tmp/ for any folders that start with UE4_metal and delete them. Then try opening the app again.

The following function should get rid of these automatically, and could potentially be run on login to make sure these folders are removed.

for TMP_FOLDER in $(/usr/bin/find /private/tmp -name UE4_metal* -type d -maxdepth 1)
do
    writelog "Removing temp folder ${TMP_FOLDER}"
    /bin/rm -rf "${TMP_FOLDER}"
done

I see this as a bug with the software, as if multiple users are accessing a Mac without the mac restarting inbetween sessions, this issue will occur.