Skip to content

Commit d17598e

Browse files
committed
bugfix : not null is never calling the function
1 parent 699016a commit d17598e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Assets/Scripts/ObjectPool/ObjectPooler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public GameObject SpawnFromPool(PooledObjectType tag, Vector3 pos, Quaternion ro
6262

6363
IPooledObject iPooledObj = objToSpawn.GetComponent<IPooledObject>();
6464

65-
if (iPooledObj == null) iPooledObj.OnObjectSpawn();
65+
iPooledObj.OnObjectSpawn();
6666

6767
PoolDictionary[tag.ToString()].Enqueue(objToSpawn);
6868
return objToSpawn;

0 commit comments

Comments
 (0)