/** CoroutineMain
         */
        public System.Collections.IEnumerator CoroutineMain(OnSoundPoolCoroutine_CallBackInterface a_callback_interface, Fee.File.Path a_path)
        {
            //result
            this.result = new ResultType();

            //ローカル、パックJSONのロード。
            Fee.JsonItem.JsonItem t_local_pack_json = null;
            {
                Fee.File.Item t_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadLocalTextFile, a_path);

                do
                {
                    if (a_callback_interface != null)
                    {
                        a_callback_interface.OnSoundPoolCoroutine(t_item.GetResultProgress());
                    }
                    yield return(null);
                }while(t_item.IsBusy() == true);

                if (t_item.GetResultAssetType() == Asset.AssetType.Text)
                {
                    t_local_pack_json = new JsonItem.JsonItem(t_item.GetResultAssetText());
                    if (t_local_pack_json == null)
                    {
                        //コンバート失敗。
                        this.result.errorstring = "Coroutine_LoadLocalPack : local_pack_json == null";
                        yield break;
                    }
                }
                else
                {
                    //ローカルにキャッシュなし。
                }
            }

            Pack t_local_pack = Fee.JsonItem.Convert.JsonItemToObject <Pack>(t_local_pack_json);

            if (t_local_pack == null)
            {
                //コンバート失敗。
                this.result.errorstring = "Coroutine_LoadLocalPack : local_pack == null";
                yield break;
            }

            //パス解決。
            {
                t_local_pack.fullpath_list = new System.Collections.Generic.List <File.Path>();
                for (int ii = 0; ii < t_local_pack.name_list.Count; ii++)
                {
                    t_local_pack.fullpath_list.Add(File.Path.CreateLocalPath(t_local_pack.name_list[ii], Fee.File.Path.SEPARATOR));
                }
            }

            this.result.pack = t_local_pack;
            yield break;
        }
Exemple #2
0
        /** CoroutineMain
         */
        public System.Collections.IEnumerator CoroutineMain(Fee.Data.OnDataCoroutine_CallBackInterface a_callback_interface, ListItem a_listitem)
        {
            //result
            this.result = new ResultType();

            AssetBundleList.Item t_assetbundlelist_item = null;
            Fee.File.Item        t_file_item            = null;

            switch (a_listitem.path_type)
            {
            case PathType.AssetBundle_Prefab:
            {
                t_assetbundlelist_item = Fee.AssetBundleList.AssetBundleList.GetInstance().RequestLoadAssetBundleItemPrefabFile(a_listitem.assetbundle_name, a_listitem.id);
                if (t_assetbundlelist_item == null)
                {
                    //失敗。
                    this.result.errorstring = "Coroutine_Load : " + a_listitem.assetbundle_name + " : " + a_listitem.id;
                    yield break;
                }
            } break;

            case PathType.AssetBundle_Texture:
            {
                t_assetbundlelist_item = Fee.AssetBundleList.AssetBundleList.GetInstance().RequestLoadAssetBundleItemTextureFile(a_listitem.assetbundle_name, a_listitem.id);
                if (t_assetbundlelist_item == null)
                {
                    //失敗。
                    this.result.errorstring = "Coroutine_Load : " + a_listitem.assetbundle_name + " : " + a_listitem.id;
                    yield break;
                }
            } break;

            case PathType.AssetBundle_Text:
            {
                t_assetbundlelist_item = Fee.AssetBundleList.AssetBundleList.GetInstance().RequestLoadAssetBundleItemTextFile(a_listitem.assetbundle_name, a_listitem.id);
                if (t_assetbundlelist_item == null)
                {
                    //失敗。
                    this.result.errorstring = "Coroutine_Load : " + a_listitem.assetbundle_name + " : " + a_listitem.id;
                    yield break;
                }
            } break;

            case PathType.Resources_Prefab:
            {
                //リソース。プレハブ。
                t_file_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadResourcesPrefabFile, a_listitem.path);
                if (t_file_item == null)
                {
                    //失敗。
                    this.result.errorstring = "Coroutine_Load : " + a_listitem.path;
                    yield break;
                }
            } break;

            case PathType.Resources_Texture:
            {
                //リソース。テクスチャ。
                t_file_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadResourcesTextureFile, a_listitem.path);
                if (t_file_item == null)
                {
                    //失敗。
                    this.result.errorstring = "Coroutine_Load : " + a_listitem.path;
                    yield break;
                }
            } break;

            case PathType.Resources_Text:
            {
                //リソース。テキスト。
                t_file_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadResourcesTextFile, a_listitem.path);
                if (t_file_item == null)
                {
                    //失敗。
                    this.result.errorstring = "Coroutine_Load : " + a_listitem.path;
                    yield break;
                }
            } break;

            case PathType.StreamingAssets_Texture:
            {
                //ストリーミングアセット。テクスチャ。
                t_file_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadStreamingAssetsTextureFile, a_listitem.path);
                if (t_file_item == null)
                {
                    //失敗。
                    this.result.errorstring = "Coroutine_Load : " + a_listitem.path;
                    yield break;
                }
            } break;

            case PathType.StreamingAssets_Text:
            {
                //ストリーミングアセット。テキスト。
                t_file_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadStreamingAssetsTextFile, a_listitem.path);
                if (t_file_item == null)
                {
                    //失敗。
                    this.result.errorstring = "Coroutine_Load : " + a_listitem.path;
                    yield break;
                }
            } break;

            case PathType.StreamingAssets_Binary:
            {
                //ストリーミングアセット。バイナリ。
                t_file_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadStreamingAssetsBinaryFile, a_listitem.path);
                if (t_file_item == null)
                {
                    //失敗。
                    this.result.errorstring = "Coroutine_Load : " + a_listitem.path;
                    yield break;
                }
            } break;

            case PathType.Url_Texture:
            {
                //URL。テクスチャ。
                t_file_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadUrlTextureFile, a_listitem.path);
                if (t_file_item == null)
                {
                    //失敗。
                    this.result.errorstring = "Coroutine_Load : " + a_listitem.path;
                    yield break;
                }
            } break;

            case PathType.Url_Text:
            {
                //URL。テキスト。
                t_file_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadUrlTextFile, a_listitem.path);
                if (t_file_item == null)
                {
                    //失敗。
                    this.result.errorstring = "Coroutine_Load : " + a_listitem.path;
                    yield break;
                }
            } break;

            case PathType.Url_Binary:
            {
                //URL。バイナリ。
                t_file_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadUrlBinaryFile, a_listitem.path);
                if (t_file_item == null)
                {
                    //失敗。
                    this.result.errorstring = "Coroutine_Load : " + a_listitem.path;
                    yield break;
                }
            } break;

                        #if (UNITY_EDITOR)
            case PathType.AssetsPath_Prefab:
            {
                //TODO:

                /*
                 * //アセット。プレハブ。
                 * t_file_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadAssetsPathTextFile,a_listitem.path);
                 * if(t_file_item == null){
                 *      //失敗。
                 *      this.result.errorstring = "Coroutine_Load : " + a_listitem.path;
                 *      yield break;
                 * }
                 */
            } break;

            case PathType.AssetsPath_Text:
            {
                //アセット。テキスト。
                t_file_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadAssetsPathTextFile, a_listitem.path);
                if (t_file_item == null)
                {
                    //失敗。
                    this.result.errorstring = "Coroutine_Load : " + a_listitem.path;
                    yield break;
                }
            } break;

            case PathType.AssetsPath_Texture:
            {
                //TODO:

                /*
                 * //アセット。テクスチャ。
                 * t_file_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadUrlBinaryFile,a_listitem.path);
                 * if(t_file_item == null){
                 *      //失敗。
                 *      this.result.errorstring = "Coroutine_Load : " + a_listitem.path;
                 *      yield break;
                 * }
                 */
            } break;
                        #endif

            default:
            {
                Tool.Assert(false);
            } break;
            }

            if (t_assetbundlelist_item != null)
            {
                //ロード中。
                do
                {
                    if (a_callback_interface != null)
                    {
                        a_callback_interface.OnDataCoroutine(t_assetbundlelist_item.GetResultProgress());
                    }
                    yield return(null);
                }while(t_assetbundlelist_item.IsBusy() == true);

                switch (a_listitem.path_type)
                {
                case PathType.AssetBundle_Prefab:
                {
                    if (t_assetbundlelist_item.GetResultAssetType() == Asset.AssetType.Prefab)
                    {
                        if (t_assetbundlelist_item.GetResultAssetPrefab() != null)
                        {
                            this.result.asset_file = t_assetbundlelist_item.GetResultAsset();
                            yield break;
                        }
                    }
                } break;

                case PathType.AssetBundle_Texture:
                {
                    if (t_assetbundlelist_item.GetResultAssetType() == Asset.AssetType.Texture)
                    {
                        if (t_assetbundlelist_item.GetResultAssetTexture() != null)
                        {
                            this.result.asset_file = t_assetbundlelist_item.GetResultAsset();
                            yield break;
                        }
                    }
                } break;

                case PathType.AssetBundle_Text:
                {
                    if (t_assetbundlelist_item.GetResultAssetType() == Asset.AssetType.Text)
                    {
                        if (t_assetbundlelist_item.GetResultAssetText() != null)
                        {
                            this.result.asset_file = t_assetbundlelist_item.GetResultAsset();
                            yield break;
                        }
                    }
                } break;

                default:
                {
                    Tool.Assert(false);
                } break;
                }

                //失敗。
                this.result.errorstring = "Coroutine_Load : " + t_assetbundlelist_item.GetResultErrorString();
                yield break;
            }

            if (t_file_item != null)
            {
                //ロード中。
                do
                {
                    if (a_callback_interface != null)
                    {
                        a_callback_interface.OnDataCoroutine(t_file_item.GetResultProgress());
                    }
                    yield return(null);
                }while(t_file_item.IsBusy() == true);

                switch (a_listitem.path_type)
                {
                case PathType.Resources_Prefab:
                {
                    //リソース。プレハブ。
                    if (t_file_item.GetResultAssetType() == Asset.AssetType.Prefab)
                    {
                        if (t_file_item.GetResultAssetPrefab() != null)
                        {
                            this.result.asset_file = t_file_item.GetResultAsset();
                            yield break;
                        }
                    }
                } break;

                case PathType.Resources_Texture:
                case PathType.StreamingAssets_Texture:
                case PathType.Url_Texture:
                {
                    //リソース。テクスチャ。
                    //ストリーミングアセット。テクスチャ。
                    //URL。テクスチャ。

                    if (t_file_item.GetResultAssetType() == Asset.AssetType.Texture)
                    {
                        if (t_file_item.GetResultAssetTexture() != null)
                        {
                            this.result.asset_file = t_file_item.GetResultAsset();
                            yield break;
                        }
                    }
                } break;

                case PathType.Resources_Text:
                case PathType.StreamingAssets_Text:
                case PathType.Url_Text:
                {
                    //リソース。テキスト。
                    //ストリーミングアセット。テキスト。
                    //URL。テキスト。

                    if (t_file_item.GetResultAssetType() == Asset.AssetType.Text)
                    {
                        if (t_file_item.GetResultAssetText() != null)
                        {
                            this.result.asset_file = t_file_item.GetResultAsset();
                            yield break;
                        }
                    }
                } break;

                case PathType.StreamingAssets_Binary:
                case PathType.Url_Binary:
                {
                    //ストリーミングアセット。バイナリ。
                    //URL。バイナリ。

                    if (t_file_item.GetResultAssetType() == Asset.AssetType.Binary)
                    {
                        if (t_file_item.GetResultAssetBinary() != null)
                        {
                            this.result.asset_file = t_file_item.GetResultAsset();
                            yield break;
                        }
                    }
                } break;

                default:
                {
                    Tool.Assert(false);
                } break;
                }

                //失敗。
                this.result.errorstring = "Coroutine_Load : " + t_file_item.GetResultErrorString();
                yield break;
            }

            //不明。
            Tool.Assert(false);
            this.result.errorstring = "Coroutine_Load : " + "Unknown";
            yield break;
        }
Exemple #3
0
        /** CoroutineMain
         */
        public System.Collections.IEnumerator CoroutineMain(Fee.AssetBundleList.OnAssetBundleListCoroutine_CallBackInterface a_callback_interface, string a_assetbundle_name, string a_asset_name)
        {
            //result
            this.result = new ResultType();

            AssetBundleItem t_assetbundle_item = Fee.AssetBundleList.AssetBundleList.GetInstance().GetAssetBundleItem(a_assetbundle_name);

            if (t_assetbundle_item == null)
            {
                //失敗。
                this.result.errorstring = "Coroutine_LoadAssetBundleItemPrefabFile : assetbundle_item = null : " + a_assetbundle_name + " : " + a_asset_name;
                yield break;
            }

            if (t_assetbundle_item.assetbundle_dummy != null)
            {
                //ダミーアセットバンドルが設定されている。

                string t_path;
                if (t_assetbundle_item.assetbundle_dummy.asset_list.TryGetValue(a_asset_name, out t_path) == true)
                {
                    Fee.File.Item t_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadResourcesPrefabFile, new File.Path(t_path));

                    do
                    {
                        if (a_callback_interface != null)
                        {
                            a_callback_interface.OnAssetBundleListCoroutine(t_item.GetResultProgress());
                        }
                        yield return(null);
                    }while(t_item.IsBusy() == true);

                    UnityEngine.GameObject t_prefab = null;

                    if (t_item.GetResultAssetType() == Asset.AssetType.Prefab)
                    {
                        if (t_item.GetResultAssetPrefab() != null)
                        {
                            t_prefab = t_item.GetResultAssetPrefab();
                        }
                    }

                    if (t_prefab == null)
                    {
                        //失敗。
                        this.result.errorstring = "Coroutine_LoadAssetBundleItemPrefabFile : prefab = null : " + a_assetbundle_name + " : " + a_asset_name;
                        yield break;
                    }

                    this.result.asset_file = new Asset.Asset(Asset.AssetType.Prefab, t_prefab);
                }
                else
                {
                    //失敗。
                    this.result.errorstring = "Coroutine_LoadAssetBundleItemPrefabFile : " + a_assetbundle_name + " : " + a_asset_name;
                    yield break;
                }
            }
            else if (t_assetbundle_item.assetbundle_raw != null)
            {
                //アセットバンドル。

                UnityEngine.AssetBundleRequest t_request = t_assetbundle_item.assetbundle_raw.LoadAssetAsync(a_asset_name);

                if (t_request == null)
                {
                    //失敗。
                    this.result.errorstring = "Coroutine_LoadAssetBundleItemPrefabFile : request = null : " + a_assetbundle_name + " : " + a_asset_name;
                    yield break;
                }

                do
                {
                    if (a_callback_interface != null)
                    {
                        a_callback_interface.OnAssetBundleListCoroutine(t_request.progress);
                    }
                    yield return(null);
                }while(t_request.isDone == false);

                UnityEngine.GameObject t_prefab = t_request.asset as UnityEngine.GameObject;

                if (t_prefab == null)
                {
                    //失敗。
                    this.result.errorstring = "Coroutine_LoadAssetBundleItemPrefabFile : prefab = null : " + a_assetbundle_name + " : " + a_asset_name;
                    yield break;
                }

                this.result.asset_file = new Asset.Asset(Asset.AssetType.Prefab, t_prefab);
            }
            else
            {
                Tool.Assert(false);
            }

            //失敗。
            this.result.errorstring = "Coroutine_LoadAssetBundleItemPrefabFile : " + a_assetbundle_name + " : " + a_asset_name;
            yield break;
        }
Exemple #4
0
        /** CoroutineMain
         */
        public System.Collections.IEnumerator CoroutineMain(Fee.AssetBundleList.OnAssetBundleListCoroutine_CallBackInterface a_callback_interface, string a_assetbundle_name)
        {
            //result
            this.result = new ResultType();

            {
                AssetBundleItem t_assetbundle_item = Fee.AssetBundleList.AssetBundleList.GetInstance().GetAssetBundleItem(a_assetbundle_name);

                if (t_assetbundle_item != null)
                {
                    //成功。
                    this.result.assetbundle_item = t_assetbundle_item;
                    yield break;
                }
            }

            PathItem t_pathitem = AssetBundleList.GetInstance().GetPathItem(a_assetbundle_name);

            if (t_pathitem == null)
            {
                //失敗。
                this.result.errorstring = "Coroutine_LoadPathItemAssetBundleItem : Not Found Path : " + a_assetbundle_name;
                yield break;
            }

            //ダミーアセットバンドルの読み込み。
                        #if (UNITY_EDITOR)
            if (t_pathitem.assetbundle_pathtype == AssetBundlePathType.AssetsPathDummyAssetBundle)
            {
                string t_result_string = null;
                {
                    Fee.File.Item t_item_dummy_assetbundle_json = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadAssetsPathTextFile, t_pathitem.assetbundle_path);
                    if (t_item_dummy_assetbundle_json == null)
                    {
                        //失敗。
                        this.result.errorstring = "Coroutine_LoadPathItemAssetBundleItem : item_json = null : " + a_assetbundle_name;
                        yield break;
                    }

                    do
                    {
                        if (a_callback_interface != null)
                        {
                            a_callback_interface.OnAssetBundleListCoroutine(t_item_dummy_assetbundle_json.GetResultProgress());
                        }
                        yield return(null);
                    }while(t_item_dummy_assetbundle_json.IsBusy() == true);

                    if (t_item_dummy_assetbundle_json.GetResultAssetType() == Asset.AssetType.Text)
                    {
                        t_result_string = t_item_dummy_assetbundle_json.GetResultAssetText();
                    }

                    if (t_result_string == null)
                    {
                        //失敗。
                        this.result.errorstring = "Coroutine_LoadPathItemAssetBundleItem : result_string == null : " + a_assetbundle_name;
                        yield break;
                    }
                }

                //DummryAssetBundle
                Fee.AssetBundleList.DummryAssetBundle t_dummyassetbundle = Fee.JsonItem.Convert.JsonStringToObject <Fee.AssetBundleList.DummryAssetBundle>(t_result_string);

                if (t_dummyassetbundle == null)
                {
                    //失敗。
                    this.result.errorstring = "Coroutine_LoadPathItemAssetBundleItem : dummyassetbundle = null : " + a_assetbundle_name;
                    yield break;
                }

                AssetBundleItem t_assetbundle_item = new AssetBundleItem(t_dummyassetbundle, t_pathitem);

                //登録。
                Fee.AssetBundleList.AssetBundleList.GetInstance().RegistAssetBundleItem(a_assetbundle_name, t_assetbundle_item);

                //成功。
                this.result.assetbundle_item = t_assetbundle_item;
                yield break;
            }
                        #endif

            //アセットバンドルの読み込み。
            {
                //アセットバンドル。
                Fee.Pattern.Progress t_progress = new Fee.Pattern.Progress(new float[] {
                    0.5f,
                    0.5f
                });

                //アセットバンドルのバイナリ読み込み。
                byte[] t_result_binary = null;
                {
                    Fee.File.Item t_item_bianry = null;

                    switch (t_pathitem.assetbundle_pathtype)
                    {
                                        #if (UNITY_EDITOR)
                    case AssetBundlePathType.AssetsPathAssetBundle:
                    {
                        //アセットフォルダにあるアセットバンドルの相対パス。
                        t_item_bianry = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadAssetsPathBinaryFile, t_pathitem.assetbundle_path);
                    } break;
                                        #endif

                    case AssetBundlePathType.UrlAssetBundle:
                    {
                        //URL。
                        t_item_bianry = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadUrlBinaryFile, t_pathitem.assetbundle_path);
                    } break;

                    case AssetBundlePathType.StreamingAssetsAssetBundle:
                    {
                        //ストリーミングアセット。
                        t_item_bianry = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadStreamingAssetsBinaryFile, t_pathitem.assetbundle_path);
                    } break;

                    case AssetBundlePathType.LocalAssetBundle:
                    {
                        //ローカル。
                        t_item_bianry = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadLocalBinaryFile, t_pathitem.assetbundle_path);
                    } break;

                    case AssetBundlePathType.FullPathAssetBundle:
                    {
                        //フルパス。
                        t_item_bianry = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadFullPathBinaryFile, t_pathitem.assetbundle_path);
                    } break;

                    default:
                    {
                        //失敗。
                        this.result.errorstring = "Coroutine_LoadPathItemAssetBundleItem : PathTypeError : " + a_assetbundle_name;
                        yield break;
                    } break;
                    }

                    if (t_item_bianry == null)
                    {
                        //失敗。
                        this.result.errorstring = "Coroutine_LoadPathItemAssetBundleItem : item_bianry = null : " + a_assetbundle_name;
                        yield break;
                    }

                    do
                    {
                        //■ステップ0。
                        if (a_callback_interface != null)
                        {
                            t_progress.SetStep((int)Progress_MainStep.Progress_MainStep_0_LoadBinary, 0, 1);
                            a_callback_interface.OnAssetBundleListCoroutine(t_progress.CalcProgress(t_item_bianry.GetResultProgress()));
                        }
                        yield return(null);
                    }while(t_item_bianry.IsBusy() == true);

                    if (t_item_bianry.GetResultAssetType() == Asset.AssetType.Binary)
                    {
                        t_result_binary = t_item_bianry.GetResultAssetBinary();
                    }

                    if (t_result_binary == null)
                    {
                        //失敗。
                        this.result.errorstring = "Coroutine_LoadPathItemAssetBundleItem : result_binary == null : " + a_assetbundle_name;
                        yield break;
                    }
                    else
                    {
                        System.Collections.Generic.Dictionary <string, string> t_response_header = t_item_bianry.GetResultResponseHeader();
                        if (t_response_header != null)
                        {
                            string t_response_code;
                            if (t_item_bianry.GetResultResponseHeader().TryGetValue(Fee.File.Config.RESPONSECODE_KEY, out t_response_code) == true)
                            {
                                if (t_response_code != "200")
                                {
                                    //失敗。
                                    this.result.errorstring = "Coroutine_LoadPathItemAssetBundleItem : t_response_code = " + t_response_code;
                                    yield break;
                                }
                            }
                        }
                    }
                }

                //バイナリーのアセットバンドル化。
                {
                    UnityEngine.AssetBundleCreateRequest t_request = null;

                    //LoadFromMemoryAsync
                    try{
                        t_request = UnityEngine.AssetBundle.LoadFromMemoryAsync(t_result_binary);
                    }catch (System.Exception t_exception) {
                        Tool.DebugReThrow(t_exception);
                    }
                    if (t_request == null)
                    {
                        this.result.errorstring = "Coroutine_LoadPathItemAssetBundleItem : request == null : " + a_assetbundle_name;
                        yield break;
                    }

                    do
                    {
                        //■ステップ1。
                        if (a_callback_interface != null)
                        {
                            t_progress.SetStep((int)Progress_MainStep.Progress_MainStep_1_LoadFromMemoryAsync, 0, 1);
                            a_callback_interface.OnAssetBundleListCoroutine(t_progress.CalcProgress(t_request.progress));
                        }
                        yield return(null);
                    }while(t_request.isDone == false);

                    if (t_request.assetBundle == null)
                    {
                        //失敗。
                        this.result.errorstring = "Coroutine_LoadPathItemAssetBundleItem : assetbundle == null : " + a_assetbundle_name;
                        yield break;
                    }

                    {
                        AssetBundleItem t_assetbundle_item = new AssetBundleItem(t_request.assetBundle, t_pathitem);

                                                #if (UNITY_EDITOR)
                        {
                            UnityEngine.Object[] t_object = t_request.assetBundle.LoadAllAssets();
                            for (int ii = 0; ii < t_object.Length; ii++)
                            {
                                Tool.Log(a_assetbundle_name, t_object[ii].name);
                            }
                        }
                                                #endif



                        //登録。
                        Fee.AssetBundleList.AssetBundleList.GetInstance().RegistAssetBundleItem(a_assetbundle_name, t_assetbundle_item);

                        //成功。
                        this.result.assetbundle_item = t_assetbundle_item;
                        yield break;
                    }
                }
            }
        }
        /** CoroutineMain
         */
        public System.Collections.IEnumerator CoroutineMain(OnSoundPoolCoroutine_CallBackInterface a_callback_interface, File.Path a_path, UnityEngine.WWWForm a_post_data, Fee.File.CustomCertificateHandler a_certificate_handler, bool a_is_streamingassets, uint a_data_version)
        {
            //result
            this.result = new ResultType();

            Fee.Pattern.Progress t_progress = new Fee.Pattern.Progress(new float[] {
                0.05f,
                0.1f,
                0.8f,
                0.05f
            });

            //ローカル、サウンロプール管理ファイル。相対パス。
            Fee.File.Path t_local_caoundpool_path = new File.Path(a_path.GetFileName());

            //ローカル、サウンドプール管理ファイルのロード。
            Fee.JsonItem.JsonItem t_local_soundpool_json = null;
            if (Config.USE_LOADURL_SOUNDPOOL_CACHE == true)
            {
                Fee.File.Item t_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadLocalTextFile, t_local_caoundpool_path);

                do
                {
                    //■ステップ0。
                    if (a_callback_interface != null)
                    {
                        t_progress.SetStep((int)Progress_MainStep.Progress_MainStep_0_LoadLocal_SoundPool, 0, 1);
                        a_callback_interface.OnSoundPoolCoroutine(t_progress.CalcProgress(t_item.GetResultProgress()));
                    }
                    yield return(null);
                }while(t_item.IsBusy() == true);

                if (t_item.GetResultAssetType() == Asset.AssetType.Text)
                {
                    t_local_soundpool_json = new JsonItem.JsonItem(t_item.GetResultAssetText());
                    if (t_local_soundpool_json == null)
                    {
                        //コンバート失敗。
                        this.result.errorstring = "Coroutine_LoadSoundPool : local_soundpool_json == null";
                        yield break;
                    }
                }
                else
                {
                    //ローカルにキャッシュなし。
                }
            }

            //チェック。
            if (t_local_soundpool_json != null)
            {
                if ((t_local_soundpool_json.IsAssociativeArray() == true) && (t_local_soundpool_json.IsExistItem("data_version")))
                {
                    uint t_data_version = t_local_soundpool_json.GetItem("data_version").CastToUint16();
                    if (t_data_version == a_data_version)
                    {
                        Fee.Audio.Pack_SoundPool t_local_soundpool = Fee.JsonItem.Convert.JsonItemToObject <Fee.Audio.Pack_SoundPool>(t_local_soundpool_json);
                        if (t_local_soundpool != null)
                        {
                            //最新を取得する必要なし。

                            //パス解決。
                            {
                                t_local_soundpool.fullpath_list = new System.Collections.Generic.List <File.Path>();
                                for (int ii = 0; ii < t_local_soundpool.name_list.Count; ii++)
                                {
                                    t_local_soundpool.fullpath_list.Add(File.Path.CreateLocalPath(t_local_soundpool.name_list[ii]));
                                }
                            }

                            this.result.soundpool      = t_local_soundpool;
                            this.result.responseheader = null;
                            yield break;
                        }
                        else
                        {
                            //コンバート失敗。
                        }
                    }
                    else
                    {
                        //最新のバージョンが必要。
                    }
                }
                else
                {
                    //不明なデータ。
                }

                t_local_soundpool_json = null;
            }

            //ロード。
            string t_load_stringjson = null;

            Fee.Audio.Pack_SoundPool t_load_soundpool = null;

            //サウンドプール管理ファイルのロード。
            {
                Fee.File.Item t_item = null;

                if (a_is_streamingassets == true)
                {
                    t_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadStreamingAssetsTextFile, a_path);
                }
                else
                {
                    t_item = Fee.File.File.GetInstance().RequestLoadUrl(File.File.LoadRequestType.LoadUrlTextFile, a_path, a_post_data, a_certificate_handler);
                }

                do
                {
                    //■ステップ1。
                    if (a_callback_interface != null)
                    {
                        t_progress.SetStep((int)Progress_MainStep.Progress_MainStep_1_Load_SoundPool, 0, 1);
                        a_callback_interface.OnSoundPoolCoroutine(t_progress.CalcProgress(t_item.GetResultProgress()));
                    }
                    yield return(null);
                }while(t_item.IsBusy() == true);

                this.result.responseheader = t_item.GetResultResponseHeader();

                if (t_item.GetResultAssetType() == Asset.AssetType.Text)
                {
                    //成功。
                    t_load_stringjson = t_item.GetResultAssetText();
                }
                else
                {
                    //失敗。
                    this.result.errorstring = t_item.GetResultErrorString();
                    yield break;
                }

                t_load_soundpool = JsonItem.Convert.JsonStringToObject <Fee.Audio.Pack_SoundPool>(t_load_stringjson);

                if (t_load_soundpool == null)
                {
                    //コンバート失敗。
                    this.result.errorstring = "Coroutine_LoadSoundPool : load_soundpool == null";
                    yield break;
                }
                else if (t_load_soundpool.name_list == null)
                {
                    //不明なデータ。
                    this.result.errorstring = "Coroutine_LoadSoundPool : load_soundpool.name_list == null";
                    yield break;
                }
                else if (t_load_soundpool.volume_list == null)
                {
                    //不明なデータ。
                    this.result.errorstring = "Coroutine_LoadSoundPool : load_soundpool.volume_list == null";
                    yield break;
                }
            }

            //登録サウンドのロード。
            {
                for (int ii = 0; ii < t_load_soundpool.name_list.Count; ii++)
                {
                    byte[] t_sound_binary = null;

                    //ロード。
                    {
                        Fee.File.Path t_sound_url = a_path.CreateFileNameChangePath(t_load_soundpool.name_list[ii]);

                        Fee.File.Item t_item = null;

                        if (a_is_streamingassets)
                        {
                            t_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadStreamingAssetsBinaryFile, t_sound_url);
                        }
                        else
                        {
                            t_item = Fee.File.File.GetInstance().RequestLoad(File.File.LoadRequestType.LoadUrlBinaryFile, t_sound_url);
                        }

                        do
                        {
                            //■ステップ2。
                            if (a_callback_interface != null)
                            {
                                t_progress.SetStep((int)Progress_MainStep.Progress_MainStep_2_Sound, ii * 2 + 0, t_load_soundpool.name_list.Count * 2);
                                a_callback_interface.OnSoundPoolCoroutine(t_progress.CalcProgress(t_item.GetResultProgress()));
                            }
                            yield return(null);
                        }while(t_item.IsBusy() == true);

                        if (t_item.GetResultAssetType() == Asset.AssetType.Binary)
                        {
                            //成功。
                            t_sound_binary = t_item.GetResultAssetBinary();
                        }
                        else
                        {
                            //失敗。
                            this.result.errorstring = t_item.GetResultErrorString();
                            yield break;
                        }
                    }

                    //セーブローカル。
                    {
                        Fee.File.Path t_sound_url = new File.Path(t_load_soundpool.name_list[ii]);

                        File.Item t_item = Fee.File.File.GetInstance().RequestSaveBinaryFile(File.File.SaveRequestType.SaveLocalBinaryFile, t_sound_url, t_sound_binary);

                        do
                        {
                            //■ステップ2。
                            if (a_callback_interface != null)
                            {
                                t_progress.SetStep((int)Progress_MainStep.Progress_MainStep_2_Sound, ii * 2 + 1, t_load_soundpool.name_list.Count * 2);
                                a_callback_interface.OnSoundPoolCoroutine(t_progress.CalcProgress(t_item.GetResultProgress()));
                            }
                            yield return(null);
                        }while(t_item.IsBusy() == true);

                        if (t_item.GetResultType() == File.Item.ResultType.SaveEnd)
                        {
                            //成功。
                        }
                        else
                        {
                            //失敗。
                            this.result.errorstring = t_item.GetResultErrorString();
                            yield break;
                        }
                    }
                }
            }

            //ローカル、サウンドプール管理ファイルのセーブ。
            {
                File.Item t_item = Fee.File.File.GetInstance().RequestSaveTextFile(File.File.SaveRequestType.SaveLocalTextFile, t_local_caoundpool_path, t_load_stringjson);

                do
                {
                    //■ステップ3。
                    if (a_callback_interface != null)
                    {
                        t_progress.SetStep((int)Progress_MainStep.Progress_MainStep_3_SaveLocal_SoundPool, 0, 1);
                        a_callback_interface.OnSoundPoolCoroutine(t_progress.CalcProgress(t_item.GetResultProgress()));
                    }
                    yield return(null);
                }while(t_item.IsBusy() == true);

                if (t_item.GetResultType() == File.Item.ResultType.SaveEnd)
                {
                    //成功。
                }
                else
                {
                    //失敗。
                    this.result.errorstring = t_item.GetResultErrorString();
                    yield break;
                }
            }

            //パス解決。
            {
                t_load_soundpool.fullpath_list = new System.Collections.Generic.List <File.Path>();
                for (int ii = 0; ii < t_load_soundpool.name_list.Count; ii++)
                {
                    t_load_soundpool.fullpath_list.Add(Fee.File.Path.CreateLocalPath(t_load_soundpool.name_list[ii]));
                }
            }

            this.result.soundpool = t_load_soundpool;
            yield break;
        }