/// <summary> /// Get poolable object from pool (pool will be created automatically or get from existing) /// </summary> /// <param name="parentTrans"></param> /// <returns></returns> public IPoolable GetNewObject(Transform parentTrans) { IPoolable poolable = GetNewObject(); poolable.GetComponent <Transform>().SetParent(parentTrans, false); return(poolable); }
public void Get() { IPoolable poolable = poolSet.GetPoolableObject(transform); testlist.Add(poolable.GetComponent <PoolableObject>()); testComp = poolable.gameObject; }