Пример #1
0
    /// <summary>
    /// 뷰 생성. - 새로운 뷰 생성 시 기존 뷰 제거.
    /// </summary>
    public void AddView(GirlGlobeEnums.eUIViewType _uiPanelType, object[] _param = null)
    {
        if (currentView != null)
        {
            Destroy(currentView.gameObject);
            currentView = null;
        }

        currentView     = Resources.Load <UIView>(Utils.CreateStringBuilderStr(new string[] { "Prefabs/Panel/View/", _uiPanelType.ToString() }));
        parentTransform = GameObject.Find("ViewCanvas").transform;
        currentView     = Instantiate(currentView, parentTransform).GetComponent <UIView>();


        if (_param != null)
        {
            currentView.SetData(_param);
        }

        if (uIViewTypes.Contains(_uiPanelType) == false)
        {
            uIViewTypes.Push(_uiPanelType);
        }
    }