HELP !!!! PCG Generation based on a Dynamic Spline

Hi,

Can anyone please help as I am struggling with the PCG Generation.

  1. I have C++ code for Dynamic Spline, and created Blueprint for Spline based on this code

  2. I spawned the Blueprint Dynamic Spline in Game Mode Base in BeginPlay.

  3. As the character moves then the spline will be added and updated with the points from the character position.

  4. I added PCG Component to the Dynamic Spline and assigned a PCG Graph to this component.

  5. Below is my PCG Graph nodes

  6. I added some box meshes in Static Mesh Spawner, But they do not appear in the world/viewport when PCGComponent->Generate(true) is called during the runtime. but the PCG graph is being executed, I know as the print string is printing the debug text.

  7. I read in a post where they said to include BrushComponent, but how can i link this brush component to the PCG Component or PCG Graph. I tried to attach PCG Component to Brush component in C++ code, but it does not allow it.

Thanks,

Hi @ThirupathiAdla,

If you haven’t already, I would highly recommend getting this to work in-editor with a test spline before trying to run it in-game. PCG can be really finnicky sometimes, so it’s best to check that your graph is actually doing what you want it to do first.

Hi @sarahlenker ,

I tried all even PCG Graph which is in starter content.

When i used

Get Landscape Data

Surface Sampler

, then I can see the meshes in run time.

But can not get it worked with spline data in run time.

I have been struggling with this problem for 4 days, still unable to solve it.