PCG Mesh Sampler requires Allow CPU Access in cooked builds — recommended workflow at scale?

The mesh sampler returns no points in packaged builds unless Allow CPU Access is enabled on the source static mesh. Works fine in editor.

We’re using it for a PCG-based interior generator across hundreds of house meshes (mix of single-mesh and modular kits), so toggling CPU access on everything has a real memory cost.

What’s the recommended approach?

  • Is the mesh sampler the intended path here, or should we be using collision-based sampling instead?
  • Or would there be another method that is applicable here?

Thanks!

[Attachment Removed]

Hi Maximilian!

So the short answer is we need the CPU access for the mesh sampler to work in general.

However, depending on what you’re doing, there are workarounds:

  • World ray hit query can return hits on collision (incl complex collision)
  • World raycast also does but, but can run on GPU (so ~ path tracing) against the visuals.
  • Scene capture could get you a depth buffer

Hope this is a bit of places to look into.

If you need more details, let us know!

Cheers,

Julien

[Attachment Removed]