I am making interaction system for my project. I want it to work as a system with queue of Interaction type, actor entity and target entity. Interaction has list of component types that it needs as context for the interaction to happen, eg. “eat” interaction has actor requirements for hunger component and target requirements for food component. In interaction execution it changes values for hunger component of the actor. To get those components I would want to use EntityManager.GetComponentData(Entity e) on the actor and target to get list of components needed for execution. What I would like to know is this method performant enough to use in multiplayer project where there could be let’s say 10-30 interactions every few frames?
1 Like
You can answer this question by doing the benchmark by yourself. Compare it with normal class access, job access, and job access with Burst. See what maximum number EntityManager.GetComponentData() calls can you get at a certain time, say 1ms. Decide if that number is good enough for you.