public static Entity CreateRpc(EntityManager entityManager, Entity targetConnection) { var entity = entityManager.CreateEntity(); var sendRpc = new SendRpcCommandRequestComponent { TargetConnection = targetConnection }; entityManager.AddComponentData(entity, sendRpc); return(entity); }
public static Entity CreateRpc(EntityCommandBuffer ecb, Entity targetConnection) { var entity = ecb.CreateEntity(); var sendRpc = new SendRpcCommandRequestComponent { TargetConnection = targetConnection }; ecb.AddComponent(entity, sendRpc); return(entity); }