Skip to content

Commit c7dd142

Browse files
authored
Scene change fix
1 parent 719d984 commit c7dd142

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Runtime/Pool.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public Pool(GameObject prefab, int count)
2828
if (_prefab == null)
2929
{
3030
_prefab = Object.Instantiate(prefab).AddComponent<Poolable>();
31+
UnityEngine.Object.DontDestroyOnLoad(_prefab);
3132
_prefab.gameObject.SetActive(false);
3233
}
3334

0 commit comments

Comments
 (0)