public GameObjectPrefabPool(PrefabInstantiateFunc instantiateFunc, bool createPoolCollection = false, string poolCollectionName = "Pool Collection")
        {
            InstantiateFunc = instantiateFunc;
            AliveObjs       = new List <GameObject>();
            PoolObjs        = new List <GameObject>();

            if (createPoolCollection)
            {
                GameObject obj = new GameObject(poolCollectionName);
                PoolCollection = obj.transform;
            }
        }
        public PrefabPool(T prefab, bool createPoolCollection = false, string poolCollectionName = "Pool Collection")
        {
            Prefab          = prefab;
            InstantiateFunc = null;
            AliveObjs       = new List <T>();
            PoolObjs        = new List <T>();

            if (createPoolCollection)
            {
                GameObject obj = new GameObject(poolCollectionName);
                PoolCollection = obj.transform;
            }
        }