public GameObject CantConnectPopup(string message, string error)
    {
        GameObject cantConnectPopupInstance = Instantiate(cantConnectPopup, Vector3.zero, Quaternion.identity);

        CanvasExtensions.Add(cantConnectPopupInstance);
        cantConnectPopupInstance.GetComponent <CantConnectPopup>().Show(message, error);

        return(cantConnectPopup);
    }
Exemple #2
0
    private ResultPopup MakePopup(PlayerGame game_)
    {
        GameObject  resultPopupGameObj = Instantiate(gameObject);
        ResultPopup resultPopup        = resultPopupGameObj.GetComponent <ResultPopup>();

        resultPopup.game = game_;

        CanvasExtensions.Add(resultPopupGameObj);
        //resultPopupGameObj.GetComponent<RectTransform>().SetParent();

        return(resultPopup);
    }