Entity CreateNewSector(int3 sectorWorldPos) { Entity newSectorEntity = entityManager.CreateEntity(sectorEntityArchetype); entityManager.SetComponentData(newSectorEntity, new Translation { Value = sectorWorldPos }); entityManager.SetComponentData(newSectorEntity, new Sector { entity = newSectorEntity, worldPosition = sectorWorldPos }); sectorMatrix.AddItem(newSectorEntity, sectorWorldPos); return(newSectorEntity); }