public virtual GameObject Create(IObjectPool <GameObject> pool) { GameObject target = this.Create(); PooledUnityObject pooledObj = target.AddComponent <PooledUnityObject>(); pooledObj.pool = pool; return(target); }
public T Create(IObjectPool <T> pool) { T target = this.Create(); PooledUnityObject pooledObj = target.gameObject.AddComponent <PooledUnityObject>(); pooledObj.pool = pool; pooledObj.target = target; return(target); }