'GlobalShaderCache missing' error when launching packaged Mac game

Hello! I’ve been having this problem for a few days now, and despite all my searching, I can’t find the solution to this issue.

I cook and package my project on MacOS 10.10.5, where it launches fine, but when I try to launch the game on another Mac running 10.11.4, I get the following error:

Contents/UE4/Engine/GlobalShaderCache-SF_METAL_SM4.bin’ is missing. Your application is built to load COOKED content. No COOKED content was found; This usually means you did not cook content for this build. It also may indicate missing cooked data for a shader platform(e.g., OpenGL under Windows): Make sure your platform’s packaging settings include this Targeted RHI. Alternatively build and run the UNCOOKED version instead.

Although launching the game with the -opengl command line argument on 10.11.4 allows it to launch, I need the game to be able to start up without having to manually do this.

  • I have full “rebuild enabled”
  • I have “cook everything” enabled
  • I have OpenGL 3 (SM4) enabled under Platforms → Mac → Targeted RHIs
  • I have OpenGL 3 (SM4) enabled under Platforms → Mac → Cached Shader Formats

This project was based off of the 2D side scroller template, and when I package the 2D side scroller template exactly how it comes on 10.10.5, I get the same error on 10.11.4

Any help would be much appreciated. Thanks!

The default RHI on 10.11 is Metal but if you are building your project on 10.10 you won’t be able to compile Metal shaders, so they are omitted from the project. This leads to the problem you have encountered. You’ll need to build your project on a 10.11 Mac with an up-to-date Xcode installed to get Metal working on 10.11 or you’ll need to setup the game to launch with the ‘-opengl’ command-line argument on launch so that it forces the older OpenGL renderer even on 10.11.

Ah, that’s good to know. Thanks for the quick response. Do I have to manually open terminal and launch the game with the ‘-opengl’ command line argument every time, or is there a way to make that happen by default (through UE4, terminal, etc.)?

watch this video it explains evrything and shows u how to fix!! - YouTube