public bool ExecuteSpawn(string id, Vector3 position) { if (!PoolSystem.FetchAvailable(id, out GameObject gameObject)) { return(false); } gameObject.transform.position = position; return(true); }
private bool ExecuteSpawn(string id, Vector3 position, out Poolable poolable) { if (!PoolSystem.FetchAvailable(id, out GameObject gameObject)) { poolable = default; return(false); } poolable = gameObject.GetComponentInChildren <Poolable>(); gameObject.transform.position = position; return(true); }