GorkaGames
Member
I've got a notification script that instances UI notifications. Apparently works with ObjectPool.Instantiate / Destroy (not sure if is pooling), but if I add the prefabs into the Object Pool Script it doesn't work.
GameObject temp = ObjectPool.Instantiate(m_ButtonPrefab, transform);
Debug.Log(ObjectPool.InstantiatedWithPool(temp));
//returns false
public static GameObject Instantiate(GameObject original, Vector3 position, Quaternion rotation, Transform parent)
GameObject temp = ObjectPool.Instantiate(m_ButtonPrefab, transform.position, transform.rotation, transform);
Debug.Log(ObjectPool.InstantiatedWithPool(temp));
//returns true
public static GameObject Instantiate(GameObject original, Transform parent)
{
return Instance.InstantiateInternal(original, parent.position, parent.rotation, parent);
}