Unknown Cook Error Ue5.5 might have to do with PCG?

Hello, when I go to cook my project it fails with an unknown cook error.
Earlier in the output log there’s a stack trace that appears twice, then more commands execute, then it appears once more, followed by more output until the cook fails.
The stack trace says :

UATHelper: Cooking (Windows): LogInit: Display: LogOutputDevice: Error: Ensure condition failed: GeneratedResources.IsEmpty() [File:D:\build++UE5\Sync\Engine\Plugins\PCG\Source\PCG\Private\PCGComponent.cpp] [Line: 3469]

Considering this is the only error I get I’m assuming its what’s causing the cook to fail?

Any ideas on how to fix this? Any help is greatly appreciated.

Same issue happens when cooking our project. We’re on 5.4.1.

I’ve managed to narrow down what was causing the error for me.

I was making presets for my spawners by creating child BPs of my main spawner BP. The error only happens if the spawner has generated meshes attatched to it when creating a child BP. Repro steps:

  1. Make a BP with a spline component and a PCG component
  2. Make a PCG graph that samples spline and spawns a few meshes
  3. Put BP in a level and ensure some meshes have been generated
  4. Select BP in Outliner.
  5. In Details panel of actor, select the “Edit the Blueprint for this Actor” button.
  6. Select “Create Child Blueprint Class”
  7. Leave Creation Method on “New Subclass”
  8. Go into the new BP and delete the old generated HISM component
  9. Re generate the new BP
  10. Build the game.

After some messing around with settings I think I found something that works. From what I can tell the error comes from the PCG graph having generated content in the editor. If you unclick Regenerate PCG Volume in Editor in the details panel of your PCG component and then unclick activate at the top of the details panel everything disappears. After rechecking activate and building when the map is loaded the graph generates everything. The graph will also generate in playmode so you can test it. Not sure if this is the best solution, if anyone has found anything less hacky would love to hear it.

To follow up on what I just said I also noticed that you can press generate and clean up on the graph instead of toggling activate. In theory, disabling Regenerate PCG values in the editor in the blueprint the PCG component is on should work without having to press clean up but I haven’t tried.