diff --git a/src/DotRecast.Detour.Crowd/ProximityGrid.cs b/src/DotRecast.Detour.Crowd/ProximityGrid.cs index 1fb0b75..c57d9c9 100644 --- a/src/DotRecast.Detour.Crowd/ProximityGrid.cs +++ b/src/DotRecast.Detour.Crowd/ProximityGrid.cs @@ -95,7 +95,10 @@ namespace DotRecast.Detour.Crowd long key = CombineKey(x, y); if (_items.TryGetValue(key, out var ids)) { - result.UnionWith(ids); + for (int i = 0; i < ids.Count; ++i) + { + result.Add(ids[i]); + } } } }