public static NativeEGIDMapper <T> QueryNativeMappedEntities <T>(this EntitiesDB entitiesDb, ExclusiveGroupStruct groupStructId) where T : unmanaged, IEntityComponent { if (entitiesDb.SafeQueryEntityDictionary <T>(groupStructId, out var typeSafeDictionary) == false) { throw new EntityGroupNotFoundException(typeof(T), groupStructId.ToName()); } return((typeSafeDictionary as TypeSafeDictionary <T>).ToNativeEGIDMapper(groupStructId)); }
FasterDictionary <RefWrapperType, ITypeSafeDictionary> GetDBGroup(ExclusiveGroupStruct fromIdGroupId) { if (_groupEntityComponentsDB.TryGetValue(fromIdGroupId, out FasterDictionary <RefWrapperType, ITypeSafeDictionary> fromGroup) == false) { throw new ECSException("Group doesn't exist: ".FastConcat(fromIdGroupId.ToName())); } return(fromGroup); }
public ref FilterGroup GetFilterForGroup <T>(int filterId, ExclusiveGroupStruct groupID) where T : struct, IEntityComponent { #if DEBUG && !PROFILE_SVELTO if (_filters.ContainsKey(TypeRefWrapper <T> .wrapper) == false) { throw new ECSException( $"trying to fetch not existing filters, type {typeof(T)}"); } if (_filters[TypeRefWrapper <T> .wrapper].ContainsKey(groupID) == false) { throw new ECSException( $"trying to fetch not existing filters, type {typeof(T)} group {groupID.ToName()}"); } #endif return(ref _filters[TypeRefWrapper <T> .wrapper][groupID].GetFilter(filterId));
public override string ToString() { var value = groupID.ToName(); return("id ".FastConcat(entityID).FastConcat(" group ").FastConcat(value)); }
public override string ToString() { return("id ".FastConcat(entityID).FastConcat(" group ").FastConcat(groupID.ToName())); }
public ref LegacyGroupFilters GetFiltersForGroup <T>(ExclusiveGroupStruct groupID) where T : struct, IBaseEntityComponent { #if DEBUG && !PROFILE_SVELTO if (_filtersLegacy.ContainsKey(TypeRefWrapper <T> .wrapper) == false) { throw new ECSException($"trying to fetch not existing filters, type {typeof(T)}"); } if (_filtersLegacy[TypeRefWrapper <T> .wrapper].ContainsKey(groupID) == false) { throw new ECSException( $"trying to fetch not existing filters, type {typeof(T)} group {groupID.ToName()}"); } #endif return(ref _filtersLegacy[TypeRefWrapper <T> .wrapper].GetValueByRef(groupID)); }