Download

FRUSTRATED Need help understanding component hierarchy problems - totally doesnt make sense

I need to procedurally build a grid of cells at runtime - completely dynamically. I have an outer actor called AGrid. I have a custom USceneComponent that has some debug functions, and I add this to the AGrid as the root component. I also have a UGridCell, which is a scene. I add this scene to the AGrid. UGridCell has a procedural mesh in it, and it creates this mesh and attaches it to the UGridCell instance. So I have:

AGrid → has-a → UGridCell instance → which has a → procedural mesh instance.

If I create things in the constructor, I have a deserialized version of the cell added to the AGrid, but I also need to create the grid programmatically. What makes no sense is why the procedural mesh that is inside the UGridCell, is actually in the children array of the AGrid’s scene component - even when I choose to enumerate all child components without inheritance.

There has to be something I am completely missing here. The procedural mesh should only be parented to the UGridCell, so I am unsure how to get this to work.

Any advice?

Thanks,

mf