Hi, I just start learning PCG,
(have some experience in HE though)
I’ve searched the topic about it,
only found these two threads that has a resolved answer,
one says the PCG’s not available in runtime at the moment:
the other provides a walkaround to update the PCG graph in game:
I tried testing PCG in-game by adding a slider to control the random seed,
it works in the PIE viewport, but doesn’t respond in an compiled exe program at all.
Is anyone else not having luck with this? I tried making a BP and adding the PCG component to it. The PCG graph is simple it just takes a point and spawns a sphere mesh on it. I setup keyboard inputs in the BP so that 8 takes the PCG component and does Cleanup, and then 9 does Generate. I set the generation trigger to Generate on Demand. When I test this in game and hit 8, the pcg component will cleanup correctly, but then when I hit 9 it wont generate again. Am I missing something on the steps? Can’t seem to find a way to get it to generate in game, and I know that’s accessing the component correctly because cleanup is working. I have generate on demand checked in the BP not sure what else would be the issue.
I encountered the same issue and it has been bothering me for nearly a week. I searched extensively on Google and YouTube but found no solution. Fortunately, I stumbled upon the problem’s cause unintentionally.
It seems that the PCGComponent requires a BrushComponent to work at runtime. Strangely, it appears to function without a BrushComponent in the Editor. Additionally, the BrushComponent is not searchable under the “Add” menu. Consequently, my workaround was to use “Get Actor By Class” to obtain the PCGVolume and achieve the desired effect.