How do I set Zen DDC location to the project folder?

I’ve always set the DDC to be local inside my project folder, each project had its own LocalDerivedDataCache folder.
That way, when I backed up up a project and moved it to a different computer, I’d keep the cache so the engine didn’t waste time recreating it.

The way I did this was by editing a line in BaseEngine.ini:
Under [InstalledDerivedDataBackendGraph]
Change Path="%ENGINEVERSIONAGNOSTICUSERDIR%DerivedDataCache"
To Path="%GAMEDIR%LocalDerivedDataCache"

I recently switchted to UE5.4 and noticed the method above did not work. And I discovered it’s because of a new thing called “Zen”.
Zen is saving the cache to %LocalAppData%\UnrealEngine\Common\Zen\Data

How can I make it save a project folder? Preferably make it so that it persists when I create new projects.

Thanks.

I have the same problem, if you have a solution please @me, thank you

TLDR:
After launching a project and already compiling shaders to the default Zen DDC Folder(sigh), go to
Editor Preferences > Global > Derived Data Cache
and set the Project Local DDC Path to
%GAMEDIR%LocalDerivedDataCache
Upon restart, the project will compile shaders from scratch but they will be placed inside the project folder.

I can’t find where this variable is stored, so it’s not possible to set it prior to launching a new project.
I can’t even export any of the settings?!


I’ve read the DDC documentation, again, and the comments in BaseEngine.ini file, again.

The following command sets an environment variable which supposedly sets the location for the DDC system, Zen or otherwise.

setx UE-LocalDataCachePath %GAMEDIR%LocalDerivedDataCache

But it does not work.


I did find a line in BaseEngine.ini to make the Zen DDC save to the current project folder.

Under the [Zen.AutoLaunch] section, change the
DataPath=%ENGINEVERSIONAGNOSTICINSTALLEDUSERDIR%Zen/Data
line to:
DataPath=%GAMEDIR%LocalDerivedDataCache

But I was too quick to celebrate.
Unfortunately, upon a launching a different project, this method deletes the previous DDC location.


My conclusion is that it’s bugged. Epic, please fix.
I had already reported that the environment variable not working a month ago. Though, I can’t find my report now for whatever reason.

1 Like