Unreal 5.4.3 - Unbounded Runtime PCG

I’ve managed to fumble my way into some progress on this I guess. This post was helpful in figuring out how to sample static meshes from arbitrary actors in the scene.

I’ve settled on this sort of approach for now:

It feels a bit awkward that I can’t, say, get an array of actors and then iterate on that array to get multiple actor properties from each actor as far as I can tell - both ‘Get Actor Property’ and ‘Get Actor Data’ don’t seem to allow you to pass anything into them, so they’re forced to fetch their actor independently(?).

But, the loop subgraph does allow me to iterate over those two arrays simultaneously:

It feels awkward, but it works - I’m successfully able to grab a static mesh from each of my spawned actors, scatter positions on it, and then transform those positions to where the mesh is. That enables this kind of labyrinth being spawned under your feet to work:

The road is being generated out of tiles around the player as they move about, whereas PCG successfully grabs those tiles and spawns some placeholder bushes across the surface.

My remaining puzzlement though is that I’ve gotten this to work while largely having to ignore the hierarchical generation side of things. Bushes generate immediately, on all tiles that exist, and I’m still not sure how to constrain this generation to just be in the vicinity of the player. Additionally, when the network refreshes, it seems like all of the vegetation sometimes pops in and out of existence, which suggests that it’s not managing to do any caching and just regenerates all instances when it updates (maybe when a tile is added or removed?).

I’d love to figure out a way to make this more stable and constrain the generation to be just around the player, to keep it performant - e.g. having 1km x 1km meadow tiles being spawned at runtime by a blueprint, but only scattering in a 100m circle around the player, as you move around from tile to tile.