Пример #1
0
    /// <summary>
    /// 이전 UI 삭제 후 씬 로드 (매개변수 :씬이름)
    /// </summary>
    public void Load_Scene(string sceneName)
    {
        GameObject orinObj  = Resources.Load(string.Format("Prefebs/{0}", "GameLoading")) as GameObject;
        GameObject CloneObj = Instantiate(orinObj) as GameObject;

        CloneObj.transform.SetParent(UI_Manager.Getsingleton.CanvasTr);

        RectTransform _cloneRectTr    = CloneObj.GetComponent <RectTransform>();
        RectTransform _OrinIObjRectTr = orinObj.GetComponent <RectTransform>();

        _cloneRectTr.sizeDelta        = _OrinIObjRectTr.sizeDelta;
        _cloneRectTr.anchoredPosition = _OrinIObjRectTr.anchoredPosition;
        _cloneRectTr.localScale       = _OrinIObjRectTr.localScale;

        StartCoroutine(Loadmanager.LoadScene(sceneName, callback_Complete_LoadScene, callback_nextProcess_loadScene, CloneObj.GetComponent <GameLoadProcess>().slider));

        //동기방식



        //SceneManager.LoadScene(sceneName);
        //UI_Manager.Getsingleton.ClearPopupUI();
        //UI_Manager.Getsingleton.ClearALL_UI();
        //UI_Manager.Getsingleton.Find_UICanvasTr();
    }
Пример #2
0
    /// <summary>
    /// 전투씬 끝나고 로비로 이동 함수
    /// </summary>
    public void Set_GoToLobby()
    {
        //네트워크 끊기
        //Link_Script.ins.MainMenu_Move_Init();

        //모든팝업 클리어하기
        UI_Manager.Getsingleton.ClearPopupUI();

        UI_Manager.Getsingleton.ClearALL_UI();

        UI_Manager.Getsingleton._UI = UI.LOBBY;

        Scene _scene = SceneManager.GetActiveScene();

        if (_scene.name != DefineKey.Main)
        {
            //SceneManager.LoadScene(DefineKey.Main);
            //SceneManager.LoadSceneAsync(DefineKey.Main);
            StartCoroutine(Loadmanager.LoadScene(DefineKey.Main, callback_1, callback_2, null));
            //StartCoroutine(Loadmanager.LoadScene("temp", callback_1, callback_2, null));
            //SceneManager.UnloadSceneAsync(SceneManager.GetActiveScene());
        }
    }