Browse Source

fixed wrong code behaviour

tags/Rel2b2
sebas77 6 years ago
parent
commit
ff5816b6b0
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      Svelto.ECS/EntityViewsDB.cs

+ 5
- 1
Svelto.ECS/EntityViewsDB.cs View File

@@ -39,8 +39,12 @@ namespace Svelto.ECS.Internal

if (_groupEntityViewsDB.TryGetValue(group, out entitiesInGroupPerType) == false)
return RetrieveEmptyEntityViewList<T>();

ITypeSafeList outList;
if (entitiesInGroupPerType.TryGetValue(typeof(T), out outList) == false)
return RetrieveEmptyEntityViewList<T>();
return new FasterReadOnlyList<T>((FasterList<T>) entitiesInGroupPerType[typeof(T)]);
return new FasterReadOnlyList<T>((FasterList<T>) outList);
}

public T[] QueryEntityViewsAsArray<T>(out int count) where T : IEntityView


Loading…
Cancel
Save