AddChildActorComponent construction script not working in PIE

I am having trouble using the AddChildActorComponent in the construction script to create procedural content. This worked in UE 4.5 but broken when I upgraded to UE 4.6. I tried recreating everything from scratch in UE 4.6 but it is still broken.

My goal is to create the RandWLilys blueprint which allows a NumLillies and Radius variable so that when you place it in the level the construction script randomly places NumLillies copies of the WaterLily object in the level. The blueprint shown below fires the construction script when I am editing the level and shows the randomly places child objects. But when I play in editor I only see one WaterLily object centered at the parent location and no children.

I am guessing there is some no setting or feature in UE 4.6 which I need to set in order for this to work.

Please advise.

Thanks,
-X

Hi Xarol,

The ‘Get Random Points in Radius’ is an AI Navigation node. Although this may have worked in 4.5, it is meant for AI and was likely changed in the 4.6 update.

The best way to do this now is to calculate the Radius, Rotation, and Scale by using math nodes.

You can see this method used in the Blueprint Content Example DLC. It is in the Blueprint_Advanced level in example 1.1.

If you have any questions, please feel free to ask.

Cheers,

TJ