Пример #1
0
    void showLosePopUp()
    {
        GameObject parent = UICamera.first.transform.parent.gameObject;

        Debug.Log("PARENT NAME: " + parent.name);
        //Prefab
        GameObject        obj   = NGUITools.AddChild(parent, losePopUpPrefab);
        EscapeDeniedPopUp popup = obj.GetComponent <EscapeDeniedPopUp>();
    }
Пример #2
0
    IEnumerator EscapeDeniedPopUp()
    {
        yield return(new WaitForSeconds(0.8f));

        //Do something

        GameObject parent = UICamera.first.transform.parent.gameObject;

        Debug.Log("PARENT NAME: " + parent.name);
        //Prefab
        GameObject        obj   = NGUITools.AddChild(parent, escapeDeniedPrefab);
        EscapeDeniedPopUp popup = obj.GetComponent <EscapeDeniedPopUp>();
    }