ResourceManager.ReturnTransformToPool C# (CSharp) Method

ReturnTransformToPool() public method

Return obj to the pool
public ReturnTransformToPool ( Transform t ) : void
t Transform
return void
    public void ReturnTransformToPool(Transform t)
    {
        if (t == null)
        {
        #if UNITY_EDITOR
            Debug.LogError("[ResourceManager] try to return a null transform to pool!");
        #endif
            return;
        }
        //set gameobject active flase to avoid a onEnable call when set parent
        t.gameObject.SetActive(false);
        t.SetParent(null, false);
        ReturnObjectToPool(t.gameObject);
    }