Esempio n. 1
0
    void AddObject(PoolObject sample, Transform objects_parent)
    {
        GameObject temp;

        temp      = GameObject.Instantiate(sample.GetGameobject());
        temp.name = sample.GetName();
        temp.transform.SetParent(objects_parent);
        objects.Add(temp.GetComponent <PoolObject>());
        temp.SetActive(false);
    }