public void Initialize(PoolableObject parPrefabObect, int parNumber) { ObjectInPool = new List <PoolableObject>(); for (int i = 0; i < parNumber; ++i) { PoolableObject go = MonoBehaviour.Instantiate(parPrefabObect); go.DeInit(); ObjectInPool.Add(go); } }
// release an active object public void ReleasePooledObject(PoolableObject parObject) { parObject.DeInit(); }