It appears that passing in an actor reference (or other variables) into the node “add component” is invalid during the begin play event, but is then recognized after 1 frame.
Steps:
- Create an actor.
- Create an actor component.
- Inside the actor component create an actor reference and an int variable. Mark both as editable and expose on spawn.
- inside the actor component, after begin play, query the actor reference and check the int value with print strings.
- Inside the actor, on begin play (or a delayed event), add the actor component and pass in a self reference and set the int value to any other than 0.