private ArcheType CreateArcheType(Entity entity) { var types = GetComponentTypes(entity); int hashCode = ArcheTypeEqualityComparer.GetHashCode(types); #warning can probably remove allocation if customizing set to be only for this type var acheType = _archTypes.GetOrAddByHash(hashCode, (hash) => new ArcheType(types)); _archeTypeMap.TryAdd(acheType, CreateArcheTypeEntitySet()); return(acheType); }
internal ArcheType GetArcheType(Type[] components) { int hashCode = ArcheTypeEqualityComparer.GetHashCode(components); return(_archTypes.GetByHash(hashCode)); }