Skip to content

Commit 2c5b0c5

Browse files
Merge pull request #909 from f2069/fix-pool-count
Fix save cache count
2 parents c4af956 + 34a2c6e commit 2c5b0c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Assets/FishNet/Runtime/Utility/Performance/DefaultObjectPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ public Stack<NetworkObject> GetCache(int collectionId, int prefabId, bool create
284284
Dictionary<int, Stack<NetworkObject>> dict = new();
285285
_cache.Add(dict);
286286
}
287-
_cacheCount = collectionId;
287+
_cacheCount = _cache.Count;
288288
}
289289

290290
Dictionary<int, Stack<NetworkObject>> dictionary = _cache[collectionId];

0 commit comments

Comments
 (0)