Skip to content

Commit

Permalink
optimize the scene order
Browse files Browse the repository at this point in the history
  • Loading branch information
ertanturan committed Oct 17, 2020
1 parent 501b7e2 commit af7b2b3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ public void Despawn(GameObject obj)
PoolDictionary[tag].Enqueue(obj);

IPooledObject iPooledObj = obj.GetComponent<IPooledObject>();
if (iPooledObj != null) iPooledObj.OnObjectDespawn();
if (iPooledObj != null)
{
iPooledObj.OnObjectDespawn();
}
obj.transform.SetParent(_poolMasters[tag]);
obj.SetActive(false);


Expand Down

0 comments on commit af7b2b3

Please sign in to comment.