Ejemplo n.º 1
0
    public void SetInGameUI(bool _isContinue = false)
    {
        if (createIngameUI == null)
        {
            Debug.LogError("UIManager CreateIngameUI is Null !!");
            return;
        }

        if (inGameUI == null)
        {
            GameObject go = Instantiate(createIngameUI, transform);
            inGameUI = go.GetComponent <InGameUIController>();
        }

        if (lobbyUI != null)
        {
            lobbyUI.gameObject.SetActive(false);
        }

        if (loadingUI != null)
        {
            loadingUI.gameObject.SetActive(false);
        }

        inGameUI.gameObject.SetActive(true);
        inGameUI.OnInitialized(_isContinue);

        SetMainCanvasScale(inGameUI.GetComponent <CanvasScaler>());
    }