Add ActorComponent node not using Expose on Spawn Settings

When dynamically adding an ActorComponent node from BeginPlay, the Add ActorComponent node does not use the Expose on Spawn settings from the Add node. This is happening on 4.14 and 4.15

Steps to reproduce from empty project:

  1. Create a blueprint from ActorComponent called BP_ActorComponent. In BP_ActorComponent, create a variable called StringVar, set it to Expose on Spawn and Editable, and make the default “Default”.

  2. From BP_ActorComponent’s Event BeginPlay, drag a pin and create a Print String node. Set the StringVar variable as the string input.

  3. Create a blueprint with StaticMeshActor as the parent. From the Blueprints BeginPlay event, create a “Add BP_ActorComponent” node. In the node, change the variable StringVar to “Not the default”

  4. On Play, “Default” will print to the screen instead of “Not the default”

Example project attached

Hello dingtech,

After looking through you project and it appears to be working as intended. Components are initialized before actor’s begin play. I have provided a link to documentation that includes a flow graph. I hope that this information helps.

Link: Unreal Engine Actor Lifecycle | Unreal Engine 5.1 Documentation

Make it a great day

Im not sure that addresses the issue? In this example, the Actor’s BeginPlay is adding an ActorComponent, and when the ActorComponent’s BeginPlay is then called, it is not using the Expose on Spawn variable that is being passed to it from the Actor’s BeginPlay node.

Messing around with your project I managed to get it to work by placing a delay node before the Print String node. It seems as if the variable is set at the same time the sphere BP adds the component and somehow the Print String node doesn’t get it in time. Might be a bug.

Similar from: