Set derived data cache for game mode

Hi how do we make sure that a derived data cache is set for game mode.

I don’t believe this can be set for a specific game mode within your project.
What you can do is set the derived data cache at a per-project or global level (Applies to all projects opened on the computer)

You can find information about doing so here: Derived Data Cache | Unreal Engine Documentation

To check if it’s working you can check the Unreal logs for something similar to:

[2019.09.18-21.11.46:357][  0]LogDerivedDataCache: Found environment variable UE-SharedDataCachePath=\\mynetwork\unreal_ddc
[2019.09.18-21.11.47:523][  0]LogDerivedDataCache: Using Shared data cache path \\mynetwork\unreal_ddc: Writable

That’s the specific log in the case that you take the environment variable approach, but if you just search for “ddc” I’m sure you’ll find the log even if you use different approaches.

Thanks Punitiate.
I have the following in the log so that confirms it has been set properly then.

 [2019.09.19-00.37.43:153][  0]LogShaderCompilers: Cannot use XGE Shader Compiler as Incredibuild is not installed on this machine.
 [2019.09.19-00.37.43:153][  0]LogShaderCompilers: Display: Using Local Shader Compiler.
 [2019.09.19-00.37.44:132][  0]LogDerivedDataCache: Display: Max Cache Size: 256 MB
 [2019.09.19-00.37.44:263][  0]LogDerivedDataCache: Loaded boot cache 0.13s 81MB ../../../../../../HP_Desktop/MyProject/DerivedDataCache/Boot.ddc.
 [2019.09.19-00.37.44:263][  0]LogDerivedDataCache: Display: Loaded Boot cache: ../../../../../../HP_Desktop/MyProject/DerivedDataCache/Boot.ddc
 [2019.09.19-00.37.44:263][  0]LogDerivedDataCache: FDerivedDataBackendGraph:  Pak pak cache file ../../../../../../BK_HP_Desktop/MyProject/DerivedDataCache/DDC.ddp not found, will not use a pak cache.
 [2019.09.19-00.37.44:263][  0]LogDerivedDataCache: Unable to find inner node Pak for hierarchical cache Hierarchy.
 [2019.09.19-00.37.44:264][  0]LogDerivedDataCache: FDerivedDataBackendGraph:  EnginePak pak cache file ../../../Engine/DerivedDataCache/DDC.ddp not found, will not use a pak cache.
 [2019.09.19-00.37.44:264][  0]LogDerivedDataCache: Unable to find inner node EnginePak for hierarchical cache Hierarchy.
 [2019.09.19-00.37.44:265][  0]LogDerivedDataCache: Using Local data cache path ../../../Engine/DerivedDataCache: Writable
 [2019.09.19-00.37.44:277][  0]LogDerivedDataCache: Using Shared data cache path R:\\MyProject\\Unreal\\DerivedDataCache: Writable