internal object GetManagedObject(ManagedComponentStore managedComponentStore, int typeIndexInQuery, int entityInChunkIndex) { var indexInArchetype = CurrentMatchingArchetype->IndexInArchetype[typeIndexInQuery]; var managedComponentArray = (int *)ChunkDataUtility.GetComponentDataRW(CurrentChunk, 0, indexInArchetype, CurrentArchetype->EntityComponentStore->GlobalSystemVersion); return(managedComponentStore.GetManagedComponent(managedComponentArray[entityInChunkIndex])); }