public void Initialize(GameObject prefab, int initialSize) { if(!prefab) Debug.LogError("Could not find prefab", this); //this.transform.position = Vector3.zero; this.transform.rotation = Quaternion.identity; this.transform.localScale = Vector3.one; this.internalPool = new ExtendablePoolGameObject(initialSize, prefab, this.transform); this.internalPool.Initialize(); }
public void Initialize(GameObject prefab) { if (!prefab) { Debug.LogError("Could not find prefab", this); } this.transform.position = Vector3.zero; this.transform.rotation = Quaternion.identity; this.transform.localScale = Vector3.one; this.internalPool = new ExtendablePoolGameObject(prefab, this.transform); }