Post Function call after ClearPCGLink

Hello,

I’m looking into the baking process of PCG.

Is there already a way to have a callback when the ClearPCGLink task in the PCG SubSystem is completed ? A bit in the same way as PostGenerateFunctionNames are called when the generation is finished, I would need to do some work on the baked asset but the task to move the components around is not done when we return from the ClearPCGLink in Blueprint.

Thank you

PM

Hi Pierre-Marc!

Sorry for the late answer, but you’re right, there’s no way to know when it’s fully ended (in the partitioned case).

As far as I can tell, components that aren’t partitioned will do the full work in the scope of the BP call, though.

It’s not something we have done yet (I’ll see what I can do), but you could probably do something yourself.

Basically, what you could do is add a FPCGOnPCGComponentClearPCGLinkDone, similar to the other delegates.

Then there would be three cases:

1- Component wasn`t partitioned -> broadcast on the delegate from the component in UPCGComponent::ClearPCGLink

2- Component is partitioned and has local components (e.g. in UPCGSubsystem::ClearPCGLink, TaskId is not InvalidPCGTaskId) -> queue another task after the CleanupTask to do the delegation, or easier yet, do the broadcast inside of the CleanupTask.

3- Component is partitioned but has no local components -> similar, but in the if TaskId == InvalidPCGTaskId.

Hopefully this helps a bit,

Cheers,

Julien

Hi Julien,

Thank you for the reply. I’ll be looking into it.

PM