Ejemplo n.º 1
0
    public static GameObject AddInstantiateObj(GameObject obj, Transform p)
    {
        GameObject o = GameObjectTools.InstantiateGO(obj);

        o.SetActive(true);
        if (p)
        {
            o.transform.SetParent(p);
        }
        o.transform.localScale    = Vector3.one;
        o.transform.localPosition = Vector3.zero;
        o.transform.localRotation = Quaternion.identity;
        return(o);
    }