I am attempting to create component payloads using prefabs. My goal is to use

var entity = EntityManagerExtensions.Instantiate(EntityManager, ai_steeringPipelinePrefab[i].Prefab);

to get all the components I need copied over to another entity (including there data)

The only way i have found so far is to get the component types from the payload entity and add them to the recieving entity with

EntityManager.AddComponents(entity, componentTypes);

But this does not copy the data.



1 Answer 1


Since no exact solution was found instead I opted to add a component to the recieving entity called LinkToPipeline that simply contains the entity so I can look up the components through EntityManager. This works for me because it's only done once during initialization so the performance hit is negligable.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .