Generic Object Pooling not working

I followed the Flappy Bird Style Game tutorial from https://unity3d.com/learn/live-training/session/making-flappy-bird-style-game, and it worked perfectly.

In the object pooling part i want to replace that with generic object pooling code for spawning columns but it is not working. I tried many methods but all are worthless. Can anybody guide how to do that?

Here is the generic object pooling code:

using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    
    [System.Serializable]
    public class ObjectPoolItem {
    	public bool shouldExpand = true;
    	public GameObject objectToPool;
    	public int amountToPool;
    }
    
    
    public class ObjectPooler : MonoBehaviour {
    
    	public static ObjectPooler SharedInstance;
    	public List<ObjectPoolItem> itemsToPool;
    
    	public List<GameObject> pooledObjects;
    
    
    
    	void Awake() {
    		SharedInstance = this;
    	}
    
    
    	// Use this for initialization
    	void Start () {
    		pooledObjects = new List<GameObject>();
    		foreach (ObjectPoolItem item in itemsToPool) {
    			for (int i = 0; i < item.amountToPool; i++) {
    				GameObject obj = (GameObject)Instantiate(item.objectToPool);
    				obj.SetActive(false);
    				pooledObjects.Add(obj);
    			}
    		}
    	}
    
    	// Update is called once per frame
    	void Update () {
    		
    	}
    
    
    	public GameObject GetPooledObject(string tag) {
    		for (int i = 0; i < pooledObjects.Count; i++) {
    			if (!pooledObjects_.activeInHierarchy && pooledObjects*.tag == tag) {*_

_ return pooledObjects*;
}
}
foreach (ObjectPoolItem item in itemsToPool) {
if (item.objectToPool.tag == tag) {
if (item.shouldExpand) {
GameObject obj = (GameObject)Instantiate(item.objectToPool);
obj.SetActive(false);
pooledObjects.Add(obj);
return obj;
}
}
}
return null;
}
}*_

You can use my generic object pooler it’s interface based: