예제 #1
0
    public void DestroyPool(GameObject spawned)
    {
        IPooled pooledObj = spawned.GetComponent <IPooled>();

        if (pooledObj != null)
        {
            pooledObj.OnUnSpawn();
        }
        spawned.transform.SetParent(transform);
        spawned.SetActive(false);
    }