Ejemplo n.º 1
0
    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();
    }
Ejemplo n.º 2
0
    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);
    }