When using Entity.AddComponents(component) on a player or agent, which are subclasses of entity, the component isn’t being added and OnBeginSimulation() is not being triggered.
Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
Verse
Steps to Reproduce
Create a component using verse and add it to a player or agent using .AddComponents()
Expected Result
Component is added to the player or agent entity and OnBeginSimulation is triggered for the component
Sadly that is intended (at least for now), Components and Child Entities are not allowed to exist on Player/Agent Entities.
You can set other entities origin to it but will not work as you may think. Entities and Agents are not the pawn in the world, is just a “virtual” class for the agent under the gameplay.
To get the pawn, you need to use the FortChar Entity (Agent.GetFortCharacter[].GetEntity[]), that will be the pawn of the agent in the world, and on this one you can attach components.
But remember that if the agent respawns or do some actions, the fort character pawn will also reset (entity will be discarded and created another, without the components you added earlier)