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);
}