I’m trying to add some entities to a DynamicBuffer on to some other entities but I get the above titled error, when using the below code.
Entities.ForEach((DynamicBuffer<EmployeeEntitysArray> bbqbusiness) =>
{
Entities.ForEach((Entity currentent, ref Person poople) =>
{
bbqbusiness.Add(new EmployeeEntitysArray { EmployeesEntitys = currentent });
});
});
Am I misunderstanding, is it trying to get the Dynamicbuffer from the entitys with the Person component, they don’t have EmployeeEntitiysArray component attached.
I’m not sure what I’m doing wrong I’ve tried other ways but they don’t seem to work either(GetBufferfromentity doesn’t seem to work). I’m not entirely sure how I get access to the DynamicBuffer on an entity with an IComponentSystem/JobSystem.