[UE4]The global shader cache file missing 运行错误解决办法

时间:2023-11-09 22:08:32

UE4项目在VS中对项目代码编译时报如错,找了好久在UE4论坛上查到了别人的解决方案,贴出来仅供大家参考。

[UE4]The global shader cache file missing 运行错误解决办法

看到一位开发者解释出错的原因如下:

There are a number of build configurations available to you, but it helps to think of them as two parts, a "State" and a "Target". In this case, your "State" is DebugGame. There are two "Targets" you could have, one that is blank, so the total build configuration is listed as "DebugGame", and one that is for opening in the editor, so the total build configuration is listed as "DebugGame Editor". The blank target is actually looking for cooked content, and so that probably explains the error message.

大致意思:有许多构建配置可用,它将它们分为两个部分,“状态”和“目标”。 在这种情况下,您的“状态”是DebugGame。 有两个“Targets”可以有,一个是空白的,所以总构建配置列为“DebugGame”,一个是在编辑器中打开,所以总构建配置为“DebugGame编辑器”。 空白目标实际上正在查找的是被编译过的内容,因此可能解释错误消息。

不是很懂希望哪位大神能热心指正一下,或更详细的解释一下。

之后看到一个开发者的解决方案:

I had this same error when building the engine from source (4.11) and launching the editor.

To solve when launching my C++ project from Visual Studio 2015, I built the following:
- Development Win64
- DebugGame Win64
- Development Editor Win64

And then Debug->Start without debugging with Development Editor Win64.

大致意思是

按下面三种解决方案配置重新构建生成一下:

- Development Win64
- DebugGame Win64
- Development Editor Win64

然后用

Development Editor Win64调试运行就OK了

试了下,确实我这边的问题解决了,因为即使同样的问题,大家遇到的情况也可能有细微差别,所以不保证一定能解决大家的问题,贴出来仅供大家参考一下。

顺便贴出 论坛上关于本问题的原址:https://forums.unrealengine.com/showthread.php?1993-GlobalShaderCache-PC3D_SM5-bin-is-missing