We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 501b7e2 commit af7b2b3Copy full SHA for af7b2b3
Assets/CustomTools/ObjectPooling/Scripts/ObjectPool/ObjectPooler.cs
@@ -98,7 +98,11 @@ public void Despawn(GameObject obj)
98
PoolDictionary[tag].Enqueue(obj);
99
100
IPooledObject iPooledObj = obj.GetComponent<IPooledObject>();
101
- if (iPooledObj != null) iPooledObj.OnObjectDespawn();
+ if (iPooledObj != null)
102
+ {
103
+ iPooledObj.OnObjectDespawn();
104
+ }
105
+ obj.transform.SetParent(_poolMasters[tag]);
106
obj.SetActive(false);
107
108
0 commit comments