Example #1
0
    static public void Destroy(string name)
    {
        GameObject obj = FindControl(name);

        if (obj != null)
        {
            obj.transform.parent = null;
            GameObject.Destroy(obj);
            AssetMgr.UnLoad(name);
        }
    }
Example #2
0
    static public void DestroyAll()
    {
        UIPanel[] panel = uiRoot.GetComponentsInChildren <UIPanel>();
        for (int i = 0, imax = panel.Length; i < imax; ++i)
        {
            AssetMgr.UnLoad(panel[i].name);
        }

        GameObject.Destroy(uiRoot.gameObject);
        GameObject rt = GameObject.Find("_RealTime");

        GameObject.Destroy(rt);
    }