Partitioned PCG component does not generate on demand (and other bugs)

Hi, I have a PCGVolume in my world with a partitioned PCGComponent that is loaded on demand. In my GameMode I’m calling

			PCGComponent->Generate(true);

which I would expect it to generate the PCG at runtime.

Unfortunately, I’m getting this error:

LogPCG: Error: [ScheduleComponent] Didn't schedule any task.
LogPCG: Warning: Process Graph was called but aborted, check for errors in log if you expected a result.

I’ve been looking at the source code but, to be frank, I’m a bit at a loss as to what to do here. This PCG works fine when generated ahead of time in the editor with partitioning enabled, and it also works fine when loaded on-demand without partitioning, but that’s it. I think partitioned PCG components loaded on demand are completely broken.

I’ve looked at the source code and I’ve narrowed it down to this:

	const TSet<TObjectPtr<APCGPartitionActor>>* PartitionActorsPtr = ComponentToPartitionActorsMap.Find(OriginalComponent);

Where basically PartitionActorsPtrs is always nullptr.

I’ve tried loading the PCG at runtime, but that has issues too. For one it doesn’t obey spatial coordinates and all actors are loaded at once. Here’s a screenshot showing what I’m talking about:

I’m a bit at a crossroads here with PCG and if I don’t overcome this challenge I’m going to need to completely drop PCG as a procedural tool…

  • Partitioned PCG components do not generate on demand
  • Partitioned PCG components generated at runtime load every single actor regardless of camera position

If anyone can help me with this, I would be hugely appreciative. Thank you.

3 Likes

I’m having the exact same issue and can’t seem to be able to do anything to prevent Unreal Engine from crashing when I try expanding my PCG volume. I’ve poured so many hours into trying to figure this out I’m starting to go crazy. I think you’re correct that the PCG volume is ignoring spatial coordinates and is trying to just load everything all at once regardless of bounds, grid size, etc.

“Generate at Runtime”, “Generate on Demand”, “Generate on Load” do not appear to do anything either because my system will crash regardless when I try to just double the size of my volume.

I agree with OP, the biggest issues that I’ve encountered:

  • Partitioned PCG components do not generate on demand
  • Partitioned PCG components generated at runtime load every single actor regardless of camera position