/// <summary>
    /// 로그인후 로비씬 이전에 번틀 버젼채크를 하며, 완료후 로비씬 로딩이 이루어진다.
    /// </summary>
    private void AssetBundleVersionCheck()
    {
        _ProgressBar.gameObject.SetActive(true);
        _ProgressLock = false;
        _BeginTime    = Time.time;

        if ((SCENEIDs)m_args[0] == SCENEIDs.FBSignOut ||
            (SCENEIDs)m_args[0] == SCENEIDs.ReConnectServer)
        {
            NET.I.AddMessage(PKID.LobbyDisconnect);
            NET.I.AddMessage(PKID.LobbyConnect);
            if (USER.I.IsGuestLogin)
            {
                NET.I.AddMessage(PKID.GuestUserJoin);
            }
            CommonLoginNeworkConnect();
        }
        else
        {
            _ProgressBar.SetFillAmount(0.03f);
            _ProgressBar.AutoAddGague(60f, null);

            StartCoroutine(BUNDLE.I.BeginVersionCheck(() => {
                _BeginTime    = Time.time;
                _ProgressLock = false;
                StartCoroutine(BUNDLE.I.DownloadUpdateFromServer(DEF.GetLobbyBundleName(), OnBundleUpdateProgress_Lobby, () => {
                    StartCoroutine(BUNDLE.I.DownloadUpdateFromServer(DEF.GetGameCommonBundleName(), OnBundleUpdateProgress_Game, () => {
                        string prefabGameName = DEF.GetGameBundleName(DEF.FIRST_INSTALL_GAME);
                        StartCoroutine(BUNDLE.I.DownloadUpdateFromServer(prefabGameName, OnBundleUpdateProgress_Game, FirstLoginNetworkConnect));
                    }, OnLoadError));
                }, OnLoadError));
            }, OnLoadError));
        }
    }
Beispiel #2
0
    public void LoadBundle()
    {
#if UNITY_EDITOR
        SOUND.I.LoadLocalDirectoryAudioClipsPackage("Lobby/", "Sounds", (x) => {
            if (!SOUND.I.IsPlay(DEF.SND.lobby_bgm))
            {
                SOUND.I.Play(DEF.SND.lobby_bgm, true);
            }
        });
#else
        SOUND.I.LoadAssetBundleAudioClipsPackage(DEF.GetLobbyBundleName());
        if (!SOUND.I.IsPlay(DEF.SND.lobby_bgm))
        {
            SOUND.I.Play(DEF.SND.lobby_bgm, true);
        }
#endif
        // 고정적인 빌드에 포함되는 리소스
        Popup = CreateUIPrefab <PopupUI>(thisTrans, "Popup_UI");
        Popup.GetComponent <UnityEngine.UI.CanvasScaler>().matchWidthOrHeight = Main.I.GetMatchWidthOrHeight();
        Popup.Initialize();

        // 가변적으로 필요시 번들및 빌드에서 처리할 리소스들
        UIGameLoadingPage = CreateUIPrefab <GameLoadingPage>(thisTrans, "GameLoadingPage");
        UIGameLoadingPage.GetComponent <UnityEngine.UI.CanvasScaler>().matchWidthOrHeight = Main.I.GetMatchWidthOrHeight();

        Gift = CreateUIPrefab <UIPopGift>(thisTrans, "Gift");
        Gift.GetComponent <UnityEngine.UI.CanvasScaler>().matchWidthOrHeight = Main.I.GetMatchWidthOrHeight();
        Gift.gameObject.SetActive(false);

        Tournaments = CreateUIPrefab <TournamentsUI>(thisTrans, "Tournaments_UI");
        Tournaments.GetComponent <UnityEngine.UI.CanvasScaler>().matchWidthOrHeight = Main.I.GetMatchWidthOrHeight();
        Tournaments.gameObject.SetActive(false);

        BroadCast = CreateUIPrefab <BroadCastUI>(thisTrans, "BroadCast_UI");
        BroadCast.GetComponent <UnityEngine.UI.CanvasScaler>().matchWidthOrHeight = Main.I.GetMatchWidthOrHeight();
        BroadCast.gameObject.SetActive(true);

        Coins = CreateUIPrefab <CoinsUI>(thisTrans, "Coins_UI");
        Coins.GetComponent <UnityEngine.UI.CanvasScaler>().matchWidthOrHeight = Main.I.GetMatchWidthOrHeight();
        Coins.gameObject.SetActive(true);
        Coins.Initialize();

        Game = CreateUIPrefab <GameUI>(thisTrans, "Game_UI");
        Game.GetComponent <UnityEngine.UI.CanvasScaler>().matchWidthOrHeight = Main.I.GetMatchWidthOrHeight();

        GuestGuide = CreateUIPrefab <UIPopGuestGuide>(thisTrans, "GuestGuide");
        GuestGuide.GetComponent <UnityEngine.UI.CanvasScaler>().matchWidthOrHeight = Main.I.GetMatchWidthOrHeight();

        PayTable = CreateUIPrefab <PayTableUI>(thisTrans, "PayTable_UI");
        PayTable.GetComponent <UnityEngine.UI.CanvasScaler>().matchWidthOrHeight = Main.I.GetMatchWidthOrHeight();

        if (eTutorial.on == CONFIG.CurrentTutorial)
        {
            Tutorial = CreateUIPrefab <UITutorial>(thisTrans, "Tutorial_UI");
        }
    }