/// <summary>
        /// Start this instance.
        /// </summary>
        IEnumerator Start()
        {
            _coverOrProf  = CoverOrProfType.None;
            _time         = 0;
            _tmpText.text = LocalMsgConst.TITLE_MYPAGE;
            _loadingOverlay.SetActive(true);
            //アンドロイドでバックグラウンドプッシュ?スプラッシュから?何かのタイミングで
            //static変数のデータが消え去ってしまうみたいなのでリカバー
            if (string.IsNullOrEmpty(AppStartLoadBalanceManager._userKey) == true)
            {
                //サーバーにイベント通知用Api(インストール時に一回のみ) ----------------------
                string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME;

                LocalFileHandler.Init(_commonFileName);

                //ファイルが作成されるまでポーリングして処理待ち
                while (System.IO.File.Exists(_commonFileName) == false)
                {
                    yield return(System.IO.File.Exists(_commonFileName) == true);
                }

                //ここでユーザーキーを取得。
                AppStartLoadBalanceManager._userKey = LocalFileHandler.GetString(LocalFileConstants.USER_KEY);

#if UNITY_ANDROID
                //ステータスバーを表示 //Android用
                ApplicationChrome.statusBarState = ApplicationChrome.States.VisibleOverContent;
#endif
            }

            //ユーザーの取得。
            new GetUserApi();
            while (GetUserApi._success == false)
            {
                yield return(GetUserApi._success == true);
            }

            if (GetUserApi._httpCatchData.result.is_auto_renewable == "true")
            {
                CommonConstants.IS_PREMIUM = true;
            }
            else
            {
                CommonConstants.IS_PREMIUM = false;
            }
            PremiumPushPanel.Instance.Init();

            //性別が取得出来ていない場合の処理。
            if (GetUserApi._httpCatchData.result.user.sex_cd == "0")
            {
                PanelGenderSelectCommon.Instance.Init();  //性別選択のUIを表示。
                _loadingOverlay.SetActive(false);
                yield break;
            }

            AppStartLoadBalanceManager._gender = GetUserApi._httpCatchData.result.user.sex_cd;

            ///メンテナンスの場合、処理を止める。
            if (AppliEventController.Instance.MaintenanceCheck() == true)
            {
                _loadingOverlay.SetActive(false);
                yield break;
            }

            ///ユーザーのステータスをチェックする処理。
            AppliEventController.Instance.UserStatusProblem();

            ///強制アップデートの場合、処理を止める。
            if (AppliEventController.Instance.ForceUpdateCheck() == true)
            {
                _loadingOverlay.SetActive(false);
                yield break;
            }

            ///アプリポップアップレビューの立ち上げ処理。
            AppliEventController.Instance.AppliReview();

            //マスターデータの取得。
            if (InitDataApi._httpCatchData == null)
            {
                new InitDataApi();
                while (InitDataApi._success == false)
                {
                    yield return(InitDataApi._success == true);
                }
            }

            //基本プロフィールを作成しているかどうかの判定。念の為、もう一回判定。
            if (string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.name) == false &&
                string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.pref) == false &&
                string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.city_id) == false &&
                string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.birth_date) == false)
            {
                //基本プロフィールを作成している。
                AppStartLoadBalanceManager._isBaseProfile = true;
            }
            else
            {
                //まだ、基本プロフィールを作成していない。
                AppStartLoadBalanceManager._isBaseProfile = false;
            }

            //こっからプッシュ飛んできた時の処理。
            if (NotificationRecieveManager._isCatch == true)
            {
                switch (AppStartLoadBalanceManager._toScenePanel)
                {
                case CommonConstants.VIEW_HISTORY:
                    HeaderPanel.Instance.BackButtonSwitch(false);
                    HeaderPanel.Instance.BackButtonSwitch(true, HistoryListCloseEvent);
                    _tmpText.text = LocalMsgConst.TITLE_HISTORY;
                    PaneHistory.Instance.Init();
                    PanelAnimate(_paneHistory);
                    _paneHistory.GetComponent <BoxCollider2D> ().enabled = false;
                    break;
                }
                NotificationRecieveManager._isCatch = false;
                yield break;
            }

            //ヘッダーパネル初期化
            PanelStateManager.InitPanelSet();

            //データの初期化等
            DataInit();

            //シーンの最初に表示する箇所、初期化。
            PanelMypageMain.Instance.Init();


//審査レビューじゃない場合のみ広告表示。
            if (GetUserApi._httpCatchData.result.review == "false")
            {
#if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR
//有料会員か?
                if (CommonConstants.IS_PREMIUM == false)
                {
// 広告の取得、表示処理

                    string spotId = "";
                    if (CommonConstants.IS_AD_TEST == true)
                    {
                        spotId = CommonConstants.IMOBILE_BANNER_SPOT_TEST_ID;
                        //インタースティシャル広告
                        IMobileSdkAdsUnityPlugin.show(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_TEST_ID);
                    }
                    else
                    {
                        spotId = CommonConstants.IMOBILE_BANNER_SPOT_ID;
                        //インタースティシャル広告
                        IMobileSdkAdsUnityPlugin.show(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_ID);
                    }

                    if (AppStartLoadBalanceManager.m_NendAdFullBoard != null)
                    {
                        AppStartLoadBalanceManager.m_NendAdFullBoard.Load();
                        AppStartLoadBalanceManager.m_NendAdFullBoard.Show();
                    }
                    if (_isUnserBanner == false)
                    {
                        _imobileBannerViewId = IMobileSdkAdsUnityPlugin.show(
                            spotId,
                            IMobileSdkAdsUnityPlugin.AdType.BANNER,
                            IMobileSdkAdsUnityPlugin.AdAlignPosition.CENTER,
                            IMobileSdkAdsUnityPlugin.AdValignPosition.BOTTOM,
                            true
                            );
                        _isUnserBanner = true;
                    }

                    //_nendAdBanner.Show ();
                }
                else
                {
                    Debug.Log(" i-mobile LOG: => Start This is Premium");

                    string spotId = "";
                    if (CommonConstants.IS_AD_TEST == true)
                    {
                        spotId = CommonConstants.IMOBILE_BANNER_SPOT_TEST_ID;
                        //インタースティシャル広告
                        IMobileSdkAdsUnityPlugin.stop(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_TEST_ID);
                    }
                    else
                    {
                        spotId = CommonConstants.IMOBILE_BANNER_SPOT_ID;
                        //インタースティシャル広告
                        IMobileSdkAdsUnityPlugin.stop(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_ID);
                    }

                    //バナー広告隠す処理。
                    IMobileSdkAdsUnityPlugin.setVisibility(_imobileBannerViewId, false);

                    //有料会員のため、広告ストップ
                    IMobileSdkAdsUnityPlugin.stop(spotId);

                    _nendAdBanner.Pause();
                    _nendAdBanner.Hide();
                    Destroy(_nendAdBanner.gameObject);
                }
#endif
            }

            _loadingOverlay.SetActive(false);

            yield break;
        }
예제 #2
0
        //---------------- ここまで - 送り放題のポップアップ ----------------


        #endregion



        #region チャットをオープン
        /// <summary>
        /// Profiles to chat open.
        /// </summary>
        /// <returns>The to chat open.</returns>
        public void ProfileToChatOpen(GameObject animObj)
        {
#if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR
            if (GetUserApi._httpCatchData.result.review == "false")
            {
                if (CommonConstants.IS_PREMIUM == false)
                {
                    //動画広告が何もない場合はアイモバイル、インターステシャルを表示。
                    if (Maio.CanShow(CommonConstants.MAIO_ZONE_ID_1) == false)
                    {
                        if (AppStartLoadBalanceManager.m_NendAdFullBoard != null)
                        {
                            AppStartLoadBalanceManager.m_NendAdFullBoard.Load();
                            AppStartLoadBalanceManager.m_NendAdFullBoard.Show();
                        }
                    }
                    else
                    {
                        //サーバーにイベント通知用Api(インストール時に一回のみ) ----------------------
                        string commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME;

                        LocalFileHandler.Init(commonFileName);
                        string isMovieFlag = LocalFileHandler.GetString(LocalFileConstants.MOVIE_POPUP_SHOW);

                        if (string.IsNullOrEmpty(isMovieFlag) == true)
                        {
                            PanelPopupAnimate(_popupMovie);
                            return;
                        }
                        else
                        {
                            AppStartLoadBalanceManager._whereFromAds = MaioMovieSdkEvent.WhereFromAds.ProfileToChat;
                            //問答無用で動画広告を表示
                            Maio.Show(CommonConstants.MAIO_ZONE_ID_1);
                            return;
                        }
                    }
                }
                else
                {
                    //有料会員の場合は何もしない。
                }
            }
#endif


            if (_blockButton.transform.GetChild(0).gameObject.activeSelf == true)
            {
                PopupPanel.Instance.PopClean();
                PopupPanel.Instance.PopMessageInsert(
                    LocalMsgConst.BLOCK_USER,
                    LocalMsgConst.OK,
                    ChatBlockEvent
                    );
                PanelPopupAnimate(GameObject.FindGameObjectWithTag(CommonConstants.POPUP_BASIC_TAG));
                return;
            }

            _panelChat.GetComponent <PanelChat> ()._maxAfterID        = "";
            _panelChat.GetComponent <PanelChat> ()._maxBeforeID       = "";
            _panelChat.GetComponent <PanelChat> ()._maxAfterIDBackup  = "";
            _panelChat.GetComponent <PanelChat> ()._maxBeforeIDBackup = "";
            _panelChat.GetComponent <PanelChat> ()._listUpdateDisable = false;            //解除処理
            PanelChat.Instance.Init(_toUserId);


            PanelPopupCloseAnimate(this.gameObject);
            _backSwipe.EventMessageTarget = _panelChat;
            PanelAnimate(animObj);
            _panelChat.GetComponent <BoxCollider2D> ().enabled = true;


            if (MypageEventManager.Instance != null || SearchEventManager.Instance != null)
            {
                HeaderPanel.Instance.BackButtonSwitch(false);
                HeaderPanel.Instance.BackButtonSwitch(true, ProfileToChatCloseEvent);
                _backSwipe.EventMessageTarget = _panelChat.gameObject;
            }

            if (MessageEventManager.Instance != null)
            {
                HeaderPanel.Instance.BackButtonSwitch(false);
                //HeaderPanel.Instance.BackButtonSwitch (true, MessageEventManager.Instance.ChatBackButton);
                HeaderPanel.Instance.BackButtonSwitch(true, ProfileToChatCloseEvent);

                _backSwipe.EventMessageTarget = _panelChat.gameObject;
            }
            if (BulletinBoardEventManager.Instance != null)
            {
                HeaderPanel.Instance.BackButtonSwitch(false);
                HeaderPanel.Instance.BackButtonSwitch(true, BulletinBoardEventManager.Instance.ProfileToChatCloseEvent);
                _backSwipe.EventMessageTarget = _panelChat.gameObject;
            }

            if (MatchingEventManager.Instance != null)
            {
                HeaderPanel.Instance.BackButtonSwitch(false);
                HeaderPanel.Instance.BackButtonSwitch(true, MatchingEventManager.Instance.ChatBackButton);
                _backSwipe.EventMessageTarget = _panelChat.gameObject;
            }
        }
예제 #3
0
        /// <summary>
        /// Naitives the init coroutine.
        /// </summary>
        /// <returns>The init coroutine.</returns>
        private IEnumerator NaitiveInitCoroutine()
        {
            string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME;

            LocalFileHandler.Init(_commonFileName);

            /// ファイルが作成されるまでポーリングして処理待ち
            while (System.IO.File.Exists(_commonFileName) == false)
            {
                yield return(System.IO.File.Exists(_commonFileName) == true);
            }

            /// 検索条件をローカルに保存しているので、そこから引いてくる。
            BulletinBoardEventManager.SearchCondition SearchCondition = LocalFileHandler.Load <BulletinBoardEventManager.SearchCondition> (LocalFileConstants.BBS_SEARCH_CONDITION_KEY);



            /// ローカルに「掲示板カテゴリ」のデータが保存されている場合の処理。
            if (string.IsNullOrEmpty(SearchCondition._CategoryID) == false)
            {
                _categoryNative.transform.GetChild(0).gameObject.SetActive(false);
                _categoryNative.transform.GetChild(1).gameObject.SetActive(true);
                var category = CommonModelHandle.GetByIdBaseData(SearchCondition._CategoryID, CurrentProfSettingStateType.BoardCategory);

                if (category != null)
                {
                    _categoryNative.transform.GetChild(1).GetComponent <Text> ().text = category.name;
                    _categoryAPIThrow = category.id;
                }
                else
                {
                    _categoryNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない";
                    _categoryAPIThrow = "";
                }
            }
            else
            {
                _categoryNative.transform.GetChild(0).gameObject.SetActive(false);
                _categoryNative.transform.GetChild(1).gameObject.SetActive(true);
                _categoryNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない";
                _categoryAPIThrow = "";
            }
            /// 性別の条件の場合の処理
            if (string.IsNullOrEmpty(SearchCondition._sex) == false)
            {
                _genderNative.transform.GetChild(0).gameObject.SetActive(false);
                _genderNative.transform.GetChild(1).gameObject.SetActive(true);

                var genderText = CommonModelHandle.GetByIdBaseData(SearchCondition._sex, CurrentProfSettingStateType.Gender);

                if (genderText != null)
                {
                    _genderNative.transform.GetChild(1).GetComponent <Text> ().text = genderText.name;
                    _sexAPIThrow = genderText.id;
                }
                else
                {
                    _genderNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない";
                    _sexAPIThrow = "";
                }
            }
            else
            {
                _genderNative.transform.GetChild(0).gameObject.SetActive(false);
                _genderNative.transform.GetChild(1).gameObject.SetActive(true);
                _genderNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない";
                _sexAPIThrow = "";
            }

            /// 年齢のまでの場合の処理。
            if (string.IsNullOrEmpty(SearchCondition._ageTo) == false)
            {
                _ageToNative.transform.GetChild(0).gameObject.SetActive(false);
                _ageToNative.transform.GetChild(1).gameObject.SetActive(true);
                _ageToNative.transform.GetChild(1).GetComponent <Text> ().text = SearchCondition._ageTo;
                _ageHighAPIThrow = SearchCondition._ageTo;
            }
            else
            {
                _ageToNative.transform.GetChild(0).gameObject.SetActive(false);
                _ageToNative.transform.GetChild(1).gameObject.SetActive(true);
                _ageToNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない";
                _ageHighAPIThrow = "";
            }

            /// 年齢の〜からの場合の処理
            if (string.IsNullOrEmpty(SearchCondition._ageFrom) == false)
            {
                _ageFromNative.transform.GetChild(0).gameObject.SetActive(false);
                _ageFromNative.transform.GetChild(1).gameObject.SetActive(true);
                _ageFromNative.transform.GetChild(1).GetComponent <Text> ().text = SearchCondition._ageFrom;
                _ageLowAPIThrow = SearchCondition._ageFrom;
            }
            else
            {
                _ageFromNative.transform.GetChild(0).gameObject.SetActive(false);
                _ageFromNative.transform.GetChild(1).gameObject.SetActive(true);
                _ageFromNative.transform.GetChild(1).GetComponent <Text> ().text = "";
                _ageLowAPIThrow = "";
            }

            /// 身長のまでの場合の処理。
            if (string.IsNullOrEmpty(SearchCondition._heightTo) == false)
            {
                _heightToNative.transform.GetChild(0).gameObject.SetActive(false);
                _heightToNative.transform.GetChild(1).gameObject.SetActive(true);
                _heightToNative.transform.GetChild(1).GetComponent <Text> ().text = SearchCondition._heightTo;
                _heightToAPIThrow = SearchCondition._heightTo;
            }
            else
            {
                _heightToNative.transform.GetChild(0).gameObject.SetActive(false);
                _heightToNative.transform.GetChild(1).gameObject.SetActive(true);
                _heightToNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない";
                _heightToAPIThrow = "";
            }

            /// 身長の〜からの場合の処理。
            if (string.IsNullOrEmpty(SearchCondition._heightFrom) == false)
            {
                _heightFromNative.transform.GetChild(0).gameObject.SetActive(false);
                _heightFromNative.transform.GetChild(1).gameObject.SetActive(true);
                _heightFromNative.transform.GetChild(1).GetComponent <Text> ().text = SearchCondition._heightFrom;
                _heightFromAPIThrow = SearchCondition._heightFrom;
            }
            else
            {
                _heightFromNative.transform.GetChild(0).gameObject.SetActive(false);
                _heightFromNative.transform.GetChild(1).gameObject.SetActive(true);
                _heightFromNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない";
                _heightFromAPIThrow = "";
            }

            /// 体型の条件の場合の初期化処理
            if (string.IsNullOrEmpty(SearchCondition._bodyType) == false)
            {
                _bodyTypeNative.transform.GetChild(0).gameObject.SetActive(false);
                _bodyTypeNative.transform.GetChild(1).gameObject.SetActive(true);
                _bodyTypeNative.transform.GetChild(1).GetComponent <Text> ().text = SearchCondition._bodyType;
                _bodyTypeAPIThrow = SearchCondition._bodyType;
            }
            else
            {
                _bodyTypeNative.transform.GetChild(0).gameObject.SetActive(false);
                _bodyTypeNative.transform.GetChild(1).gameObject.SetActive(true);
                _bodyTypeNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない";
                _bodyTypeAPIThrow = "";
            }

            ///// 画像あり、なしの条件の場合の処理
            if (string.IsNullOrEmpty(SearchCondition._isImage) == false)
            {
                _isImageNative.transform.GetChild(0).gameObject.SetActive(false);
                _isImageNative.transform.GetChild(1).gameObject.SetActive(true);

                if (SearchCondition._isImage == "0")
                {
                    _isImageNative.transform.GetChild(1).GetComponent <Text> ().text = "画像なし";
                }
                else if (SearchCondition._isImage == "1")
                {
                    _isImageNative.transform.GetChild(1).GetComponent <Text> ().text = "画像あり";
                }
                else
                {
                    _isImageNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない";
                }
                _isImageAPIThrow = SearchCondition._isImage;
            }
            else
            {
                _isImageNative.transform.GetChild(0).gameObject.SetActive(false);
                _isImageNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない";
                _isImageAPIThrow = "";
            }

            ///// 距離の条件の場合の初期化処理。
            if (string.IsNullOrEmpty(SearchCondition._radius) == false)
            {
                _radiusNative.transform.GetChild(0).gameObject.SetActive(false);
                _radiusNative.transform.GetChild(1).gameObject.SetActive(true);

                var radiusText = CommonModelHandle.GetByIdBaseData(SearchCondition._radius, CurrentProfSettingStateType.Radius);

                if (radiusText != null)
                {
                    _radiusNative.transform.GetChild(1).GetComponent <Text> ().text = radiusText.name;
                }
                else
                {
                    _radiusNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない";
                }
            }
            else
            {
                _radiusNative.transform.GetChild(0).gameObject.SetActive(false);
                _radiusNative.transform.GetChild(1).gameObject.SetActive(true);
                _radiusNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない";
            }

            /// キーワード条件の場合の初期化処理
            if (string.IsNullOrEmpty(SearchCondition._keyword) == false)
            {
                _keyword.text = SearchCondition._keyword;
            }

            yield break;
        }
예제 #4
0
    /// <summary>
    ///  WEB VIEW URL を返す
    /// </summary>
    /// <returns>APIのURL</returns>
    /// <param name="apiKey">APIの識別キー</param>
    public static string GetWebviewDataURL(string apiKey, bool secure = false)
    {
        ApiKeyValue api = GetAPIKeyValue(apiKey);

        if (api != null)
        {
            string url = "";
            string http;
            if (secure == true)
            {
                http = HTTPS;
            }
            else
            {
                http = HTTP;
            }

            if (_env == "product")
            {
                url = string.Format("{0}://{1}{2}", http, Instance.PRODUCT_WEBVIEW, api.api);
                return(url);
            }
            else if (_env == "staging")
            {
                url = string.Format("{0}://{1}{2}", Instance.STG_WEBVIEW, api.api);
                return(url);
            }
            else
            {
                //return string.Format("http://{0}{1}", Instance.DEV_DOMAIN, api.api);
                #if UNITY_EDITOR
                LocalFileHandler.Init(LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME);
                int domainSwich = LocalFileHandler.GetInt(LocalFileConstants.EDITOR_ONLY_DOMAIN_SWICHER);

                switch (domainSwich)
                {
                case (int)SeverMachineType.LOCAL:
                    url = string.Format("{0}://{1}{2}", http, Instance.LOCAL_WEBVIEW, api.api);
                    break;

                case (int)SeverMachineType.DEV:
                    url = string.Format("{0}://{1}{2}", http, Instance.DEV_WEBVIEW, api.api);
                    break;

                case (int)SeverMachineType.STG:
                    url = string.Format("{0}://{1}{2}", http, Instance.STG_WEBVIEW, api.api);
                    break;

                case (int)SeverMachineType.PRODUCTION:
                    url = string.Format("{0}://{1}{2}", http, Instance.PRODUCT_WEBVIEW, api.api);
                    break;

                default:
                    url = string.Format("{0}://{1}{2}", http, Instance.DEV_WEBVIEW, api.api);
                    break;
                }

                return(url);
                #else
                return(string.Format("{0}://{1}{2}", http, Instance.DEV_WEBVIEW, api.api));
                #endif
            }
        }
        return(null);
    }
예제 #5
0
        /// <summary>
        /// Start this instance.
        /// </summary>
        IEnumerator Start()
        {
            PanelStateManager.InitPanelSet();
            _loadingOverlay.SetActive(true);
            // アンドロイドでバックグラウンドプッシュ?スプラッシュから?何かのタイミングで
            //static変数のデータが消え去ってしまうみたいなのでリカバー
            if (string.IsNullOrEmpty(AppStartLoadBalanceManager._userKey) == true)
            {
                //サーバーにイベント通知用Api(インストール時に一回のみ) ----------------------
                string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME;

                LocalFileHandler.Init(_commonFileName);

                //ファイルが作成されるまでポーリングして処理待ち
                while (System.IO.File.Exists(_commonFileName) == false)
                {
                    yield return(System.IO.File.Exists(_commonFileName) == true);
                }

                //ここでユーザーキーを取得
                AppStartLoadBalanceManager._userKey = LocalFileHandler.GetString(LocalFileConstants.USER_KEY);

#if UNITY_ANDROID
                //ステータスバーを表示 //Android用
                ApplicationChrome.statusBarState = ApplicationChrome.States.VisibleOverContent;
#endif
            }

            //ユーザー情報を取得
            new GetUserApi();
            while (GetUserApi._success == false)
            {
                yield return(GetUserApi._success == true);
            }

            if (GetUserApi._httpCatchData.result.review == "false")
            {
#if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR
//有料会員か?
                if (CommonConstants.IS_PREMIUM == false)
                {
                    //_nendAdBanner.Show ();
                }
                else
                {
                    _nendAdBanner.Pause();
                    _nendAdBanner.Hide();
                    Destroy(_nendAdBanner.gameObject);
                }
#endif
            }


            //性別が取得出来ていない場合の処理。
            if (GetUserApi._httpCatchData.result.user.sex_cd == "0")
            {
                PanelGenderSelectCommon.Instance.Init();  //性別選択のUIを表示。
                _loadingOverlay.SetActive(false);
                yield break;
            }

            AppStartLoadBalanceManager._gender = GetUserApi._httpCatchData.result.user.sex_cd;


            ///メンテナンスの場合、処理を止める。
            if (AppliEventController.Instance.MaintenanceCheck() == true)
            {
                _loadingOverlay.SetActive(false);
                yield break;
            }

            ///ユーザーのステータスをチェックする処理。
            AppliEventController.Instance.UserStatusProblem();

            ///強制アップデートの場合、処理を止める。
            if (AppliEventController.Instance.ForceUpdateCheck() == true)
            {
                _loadingOverlay.SetActive(false);
                yield break;
            }

            ///アプリポップアップレビューの立ち上げ処理。
            AppliEventController.Instance.AppliReview();

            //マスター情報を取得。
            if (InitDataApi._httpCatchData == null)
            {
                new InitDataApi();
                while (InitDataApi._success == false)
                {
                    yield return(InitDataApi._success == true);
                }
            }

            //基本プロフィールを作成しているかどうかの判定。念の為、もう一回判定。
            if (string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.name) == false &&
                string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.pref) == false &&
                string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.city_id) == false &&
                string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.birth_date) == false)
            {
                //基本プロフィールを作成している。
                AppStartLoadBalanceManager._isBaseProfile = true;
            }
            else
            {
                //まだ、基本プロフィールを作成していない。
                AppStartLoadBalanceManager._isBaseProfile = false;
            }

            _tmpText.text = LocalMsgConst.TITLE_BBS;

            _loadingOverlay.SetActive(false);

            if (_isEventStart == false)
            {
                _isEventStart = true;
            }
            yield break;
        }
    /// <summary>
    /// Start this instance.
    /// </summary>
    IEnumerator Start()
    {
#if UNITY_IPHONE && !UNITY_EDITOR
        NotificationServices.RegisterForNotifications(
            NotificationType.Alert |
            NotificationType.Badge |
            NotificationType.Sound);

        // notification clear
        NativeRecieveManager.RemotePushClear();
#endif


        //ローディングアニメーション取得。
        _loadAnimation.SetActive(true);
        //アプリ全体で使用する変数をリセット。
        ResetStaticVariable();

        //仮登録API ----------------------
        new PreRegistUser();
        while (PreRegistUser._success == false)
        {
            yield return(PreRegistUser._success == true);
        }

        _userKey = PreRegistUser._httpCatchData.result.user.user_key;
        _gender  = PreRegistUser._httpCatchData.result.user.sex_cd;

        new GetUserApi();
        while (GetUserApi._success == false)
        {
            yield return(GetUserApi._success == true);
        }

        //-------------------------------- 広告用設定 初期化処理 ここから --------------------------------
#if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR
        if (GetUserApi._httpCatchData.result.review == "false")
        {
            string nendNativeAdApiKey_IOS = "";
            string nendNativeAdSpotId_IOS = "";

            string nendNativeAdApiKey_Android = "";
            string nendNativeAdSpotId_Android = "";

            if (CommonConstants.IS_AD_TEST == true)
            {
                //Imobile Test mode
                IMobileSdkAdsUnityPlugin.setTestMode(true);

                //Maio test mode
                Maio.SetAdTestMode(true);

                //バナー広告用 テスト
                IMobileSdkAdsUnityPlugin.registerInline(
                    CommonConstants.IMOBILE_PARTNER_TEST_ID,
                    CommonConstants.IMOBILE_MDDIA_TEST_ID,
                    CommonConstants.IMOBILE_BANNER_SPOT_TEST_ID
                    );

                IMobileSdkAdsUnityPlugin.registerFullScreen(
                    CommonConstants.IMOBILE_PARTNER_TEST_ID,
                    CommonConstants.IMOBILE_MDDIA_TEST_ID,
                    CommonConstants.IMOBILE_INTERSTATIAL_SPOT_TEST_ID
                    );

                //スポット情報の取得処理
                //バナー広告用テスト
                IMobileSdkAdsUnityPlugin.start(CommonConstants.IMOBILE_BANNER_SPOT_TEST_ID);

                //インタースティシャル広告テスト
                IMobileSdkAdsUnityPlugin.start(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_TEST_ID);

                //NEND IOS用 テスト
                nendNativeAdApiKey_IOS = CommonConstants.NEND_NATIVEAD_API_TEST_ID;
                nendNativeAdSpotId_IOS = CommonConstants.NEND_NATIVEAD_SPOT_TEST_ID;

                //NEND Android用 テスト
                nendNativeAdApiKey_Android = CommonConstants.NEND_NATIVEAD_API_TEST_ID;
                nendNativeAdSpotId_Android = CommonConstants.NEND_NATIVEAD_SPOT_TEST_ID;
            }
            else
            {
                // //バナー広告用
                IMobileSdkAdsUnityPlugin.registerInline(
                    CommonConstants.IMOBILE_PARTNER_ID,
                    CommonConstants.IMOBILE_MDDIA_ID,
                    CommonConstants.IMOBILE_BANNER_SPOT_ID
                    );

                //インタースティシャル用
                IMobileSdkAdsUnityPlugin.registerFullScreen(
                    CommonConstants.IMOBILE_PARTNER_ID,
                    CommonConstants.IMOBILE_MDDIA_ID,
                    CommonConstants.IMOBILE_INTERSTATIAL_SPOT_ID
                    );

                //フル広告用
                IMobileSdkAdsUnityPlugin.registerFullScreen(
                    CommonConstants.IMOBILE_PARTNER_ID,
                    CommonConstants.IMOBILE_MDDIA_ID,
                    CommonConstants.IMOBILE_FULL_SPOT_ID
                    );

                //スポット情報の取得処理
                //インタースティシャル
                IMobileSdkAdsUnityPlugin.start(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_ID);

                //バナー
                IMobileSdkAdsUnityPlugin.start(CommonConstants.IMOBILE_BANNER_SPOT_ID);

                //アイモバイル・フル広告用
                IMobileSdkAdsUnityPlugin.start(CommonConstants.IMOBILE_FULL_SPOT_ID);

                //NEND Native AD IOS
                nendNativeAdApiKey_IOS = CommonConstants.NEND_NATIVEAD_API_IOS_ID;
                nendNativeAdSpotId_IOS = CommonConstants.NEND_NATIVEAD_SPOT_IOS_ID;

                //NEND Native AD ANDROID
                nendNativeAdApiKey_Android = CommonConstants.NEND_NATIVEAD_API_ANDROID_ID;
                nendNativeAdSpotId_Android = CommonConstants.NEND_NATIVEAD_SPOT_ANDROID_ID;
            }



            //Nend Native Ad セットアップ処理。
                        #if UNITY_EDITOR
            // UnityEditorの場合は、広告枠のタイプを指定しテスト用の広告を使って表示の確認が行えます。
            m_NendAdClient    = NativeAdClientFactory.NewClient(NativeAdClientFactory.NativeAdType.SmallSquare);
            m_NendAdFullBoard = NendAdFullBoard.NewFullBoardAd(CommonConstants.NEND_NATIVEFULL_SPOT_IOS_ID, CommonConstants.NEND_NATIVEFULL_API_IOS_ID);
                        #elif UNITY_IPHONE
            m_NendAdClient    = NativeAdClientFactory.NewClient(nendNativeAdSpotId_IOS, nendNativeAdApiKey_IOS);
            m_NendAdFullBoard = NendAdFullBoard.NewFullBoardAd(CommonConstants.NEND_NATIVEFULL_SPOT_IOS_ID, CommonConstants.NEND_NATIVEFULL_API_IOS_ID);
                        #elif UNITY_ANDROID
            m_NendAdClient = NativeAdClientFactory.NewClient(nendNativeAdSpotId_Android, nendNativeAdApiKey_Android);
//m_NendAdFullBoard  = NativeAdClientFactory.NewClient (nendNativeAdSpotId_Android, nendNativeAdApiKey_Android);
                        #endif

            //バナー広告用。
            IMobileSdkAdsUnityPlugin.inlinieAdOrientation = IMobileSdkAdsUnityPlugin.ImobileSdkAdsInlineAdOrientation.PORTRAIT;


            //maio動画広告のクローズボタンが押された時のイベント処理。
            Maio.OnClosedAd += MaioMovieSdkEvent.OnClosed;

            //動画 広告用。
            Maio.Start(CommonConstants.MAIO_MEDIA_ID);

            NendAdBannerOrigenalManager.Instance.Init();
        }
#endif
//-------------------------------- 広告用設定 初期化処理 ここまで--------------------------------

        //メンテナンスの場合、処理を止める。
        if (AppliEventController.Instance.MaintenanceCheck() == true)
        {
            _loadAnimation.SetActive(false);
            yield break;
        }

        //ユーザーのステータスをチェックする処理。
        AppliEventController.Instance.UserStatusProblem();

        //強制アップデートの場合、処理を止める。
        if (AppliEventController.Instance.ForceUpdateCheck() == true)
        {
            _loadAnimation.SetActive(false);
            yield break;
        }

        //GPSを取得する処理。
        yield return(StartCoroutine(GpsSet()));

#if UNITY_IPHONE && !UNITY_EDITOR
        NativeRecieveManager.GetPushMessageIos();
#endif
        _tokenSent         = false;
        _toPushCatchUserId = "";

#if UNITY_ANDROID
        //ステータスバーを表示 //Android用
        ApplicationChrome.statusBarState = ApplicationChrome.States.VisibleOverContent;
#endif


        //基本プロフィールを作成しているかどうかの判定。
        if (string.IsNullOrEmpty(PreRegistUser._httpCatchData.result.user.name) == false &&
            string.IsNullOrEmpty(PreRegistUser._httpCatchData.result.user.pref) == false &&
            string.IsNullOrEmpty(PreRegistUser._httpCatchData.result.user.city_id) == false &&
            string.IsNullOrEmpty(PreRegistUser._httpCatchData.result.user.birth_date) == false)
        {
            //基本プロフィールを作成している。
            _isBaseProfile = true;
        }
        else
        {
            //まだ、基本プロフィールを作成していない。
            _isBaseProfile = false;
        }

        //サーバーにイベント通知用Api(インストール時に一回のみ) ----------------------
        _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME;

        LocalFileHandler.Init(_commonFileName);

        //ファイルが作成されるまでポーリングして処理待ち
        while (System.IO.File.Exists(_commonFileName) == false)
        {
            yield return(System.IO.File.Exists(_commonFileName) == true);
        }

        //ここでユーザーキーを保存
        LocalFileHandler.SetString(LocalFileConstants.USER_KEY, _userKey);
        LocalFileHandler.Flush();

        //レビュー時、すれ違い機能は表示しないようにしておく。リスクヘッジ。


#if UNITY_ANDROID && !UNITY_EDITOR
        _deviceToken = GCMService.GetRegistrationId();

        //デバイストークンの登録API----------------------
        if (string.IsNullOrEmpty(_deviceToken) == false)
        {
            new SetDeviceToken(_userKey, _deviceToken);
            while (SetDeviceToken._success == false)
            {
                yield return(SetDeviceToken._success == true);
            }
        }
        else
        {
            GCMService.Registration();
        }
#endif

        //初期マスターデータの取得
        //ファイルネーム比較してマスター更新分があったら再度Api飛ばしてローカルデータを更新する
        new InitDataApi();
        while (InitDataApi._success == false)
        {
            yield return(InitDataApi._success == true);
        }

        //新着メッセージ未既読のAPI取得する
        new GetUnreadMessageCountApi();
        while (GetUnreadMessageCountApi._success == false)
        {
            yield return(GetUnreadMessageCountApi._success == true);
        }
        _msgBadge = GetUnreadMessageCountApi._httpCatchData.result.count;

        var user = PreRegistUser._httpCatchData.result.user;

        if (string.IsNullOrEmpty(user.pref) == false && string.IsNullOrEmpty(user.city_id) == false &&
            user.pref != "0" && user.city_id != "0")
        {
            if (PreRegistUser._httpCatchData.result.complete.Count > 0)
            {
                //Mypageシーンに遷移 - 遷移する前にログインボーナス表示
                string loginComplete = PreRegistUser._httpCatchData.result.complete [0];
                if (string.IsNullOrEmpty(loginComplete) == false)
                {
                    StartEventManager.Instance.PanelPopupAnimate(_loginBonus);
                    _loginBonus.transform.GetChild(0).localScale = new Vector3(1, 1, 1);
                    _loadAnimation.SetActive(false);
                    yield break;
                }
                else
                {
                    _loadAnimation.SetActive(false);
                    NextSceneProccess();
                    yield break;
                }
            }
            else
            {
                _loadAnimation.SetActive(false);
                NextSceneProccess();
                yield break;
            }
        }
        else
        {
            if (_gender != "0")
            {
                NextSceneProccess();
                yield break;
            }

#if !UNITY_EDITOR && UNITY_IPHONE
            //初回時に通る処理。 => ポップアップ
            //説明用ポップアップ。
            PopupSecondSelectPanel.Instance.PopMessageInsert(
                LocalMsgConst.SELF_SHARE_INFO_CONFIRM,
                LocalMsgConst.APPROVAL,
                LocalMsgConst.DENIAL,
                PublicUserInfoAllow,
                PublicUserInfoDeny
                );
            GameObject obj = GameObject.FindGameObjectWithTag(CommonConstants.POPUP_SECOND_SELECT_TAG);
            StartEventManager.Instance.PanelPopupAnimate(obj);
#endif

            if (string.IsNullOrEmpty(LocalFileHandler.GetString(LocalFileConstants.VALID_URL_KEY)) == true)
            {
                if (GetUserApi._httpCatchData.result.review == "false")
                {
                    new Valid(_userKey);
                    while (Valid._success == false)
                    {
                        yield return(Valid._success == true);
                    }

                    //start app installed. defaul browser open
                    if (string.IsNullOrEmpty(Valid._httpCatchData.result.url) == false)
                    {
                        //ローカルファイルにvalid_urlで保存 初回インストール時のみ通知するURLとする
                        LocalFileHandler.SetString(LocalFileConstants.VALID_URL_KEY, Valid._httpCatchData.result.url);
                        LocalFileHandler.Flush();
                        var uri = new System.Uri(Valid._httpCatchData.result.url);
                        Application.OpenURL(uri.AbsoluteUri);
                    }
                }
            }
            LocalFileHandler.HashAllClear();


            _startAnimation.GetComponent <uTweenPosition> ().enabled = true;
            _loadAnimation.SetActive(false);
        }
    }