IEnumerator Setup()
    {
        state = TitleState.Input;

        GameStateInformation.IsEnglish = false;

#if UNITY_EDITOR
        const string UrlRes = @"http://*****:*****@"http://custom-sb.azurewebsites.net/Unity/Resource/lng";
#endif

        //OTPを取得
        //WWW www = new WWW(UrlRes);
        yield return(null);

        //while (www.isDone == false || www.progress != 1)
        //{
        //    yield return null;
        //}

        //yield return www;

        //if (CommonFunction.IsNull(www.error) == false)
        //{
        //    www.Dispose();
        //}
        //else
        //{
        //    if (www.text == "en")
        //    {
        //        GameStateInformation.IsEnglish = true;
        //    }
        //}

        TitleJp = GameObject.Find("TitleImage");
        TitleEn = GameObject.Find("TitleImageEng");

        if (GameStateInformation.IsEnglish == true)
        {
            GameObject.Find("OnEnglish").GetComponent <Toggle>().isOn = true;
            CommonConst.Message.SetEn();
            CommonConst.DeathMessage.SetEn();
            CommonFunction.SetActive(TitleEn, true);
            CommonFunction.SetActive(TitleJp, false);
        }
        else
        {
            GameObject.Find("OnEnglish").GetComponent <Toggle>().isOn = false;
            CommonConst.Message.SetJp();
            CommonConst.DeathMessage.SetJp();
            CommonFunction.SetActive(TitleEn, false);
            CommonFunction.SetActive(TitleJp, true);
        }

        //バナー表示
        //AdMobExt.bannerView.Show();
        //StartCoroutine(CheckStartup());

        ManageNews.Setup();

        GameObject.Find("TitleSubText").GetComponent <Text>().text = CommonConst.Message.SubTitle;

        GameObject gm = new GameObject("FloorChanger");
        _manageFade = gm.AddComponent <ManageFade>();
        _manageFade.SetupFade();
        _manageFade.Wait = 0.01f;
        _manageFade.PlayFadeOut(false, 0.5f);

        SelectedList = new Dictionary <int, GameObject>();

        GameObject.Find("OnBGMCheck").GetComponent <Toggle>().isOn =
            MusicInformation.Music.IsMusicOn;

        GameObject.Find("OnSoundCheck").GetComponent <Toggle>().isOn =
            SoundInformation.Sound.IsPlay;

        GameObject.Find("OnVoiceCheck").GetComponent <Toggle>().isOn =
            VoiceInformation.Voice.IsPlay;

        GameObject.Find("NameInputField").GetComponent <InputField>().text = ScoreInformation.Info.PlayerNameBase;

        SelectTargetPanel          = GameObject.Find("SelectTargetPanel");
        ScrollViewSelected         = GameObject.Find("SelectTargetScrollView");
        ScrollViewSelectedUnit     = GameObject.Find("SelectUnit");
        ScrollViewSelectedContents = GameObject.Find("SelectTargetContent");

        MusicInformation.Music.Setup(MusicInformation.MusicType.Title);

        StringBuilder sb = new StringBuilder();
        //キー情報の読み込み
        KeyControlModel kcm = SaveDataInformation.LoadKeyControl();
        if (CommonFunction.IsNull(kcm) == false)
        {
            KeyControlInformation.Info = kcm;
            sb.AppendLine(CommonConst.Message.KeyConfigSuccess);
        }
        KeyControlInformation.Info.OpMode = OperationMode.KeyOnly;

        GameObject.Find("PushEnter").GetComponent <Text>().text = string.Format("Push {0}", KeyControlModel.GetName(KeyControlInformation.Info.MenuOk).Trim());

        //システム情報の読み込み
        SystemInformation si = SaveDataInformation.LoadSystemInformation();
        if (CommonFunction.IsNull(si) == false)
        {
            if (CommonFunction.IsNullOrWhiteSpace(GameObject.Find("NameInputField").GetComponent <InputField>().text) == true)
            {
                GameObject.Find("NameInputField").GetComponent <InputField>().text = si.CharacterName;
            }
            MusicInformation.Music.Volume = CommonFunction.NumberToPercent(si.BGMVolume);
            SoundInformation.Sound.Volume = CommonFunction.NumberToPercent(si.SoundVolume);
            VoiceInformation.Voice.Volume = CommonFunction.NumberToPercent(si.VoiceVolume);
            sb.AppendLine(CommonConst.Message.SystemSettingSuccess);
        }
        GameObject.Find("SystemText").GetComponent <Text>().text = sb.ToString();


        //セーブデータを読み込み
        SavePlayingInformation save = SaveDataInformation.LoadPlayingValue();
        if (CommonFunction.IsNull(save) == false)
        {
            save.IsLoadSave = true;
            ResourceInformation.SaveInfo = save;
        }

        CommonFunction.SetActive(ScrollViewSelectedUnit, false);
        CommonFunction.SetActive(SelectTargetPanel, false);

        IsStart = true;
    }