Example #1
0
        ///***以下、ファイル追加・ロード処理***///


        // 管理ファイルを追加
        AssetFileBase AddSub(string path, IAssetFileSettingData settingData)
        {
            AssetFileBase file;

            //管理テーブルにあるなら、そこから
            if (!fileTbl.TryGetValue(path, out file))
            {
                if (path.Contains(" "))
                {
                    Debug.LogWarning("[" + path + "] contains white space");
                }
                AssetBundleInfo assetBundleInfo = AssetBundleInfoManager.FindAssetBundleInfo(path);
                AssetFileInfo   fileInfo        = new AssetFileInfo(path, settings, assetBundleInfo);

                //staticなアセットにあるなら、そこから
                file = StaticAssetManager.FindAssetFile(this, fileInfo, settingData);
                if (file == null)
                {
                    //カスタムロードなアセットにあるなら、そこから
                    file = CustomLoadManager.Find(this, fileInfo, settingData);
                    if (file == null)
                    {
                        //宴形式の通常ファイルロード
                        file = new AssetFileUtage(this, fileInfo, settingData);
                    }
                }
                fileTbl.Add(path, file);
            }
            return(file);
        }
Example #2
0
        AssetBundleInfo FindAssetBundleInfo(string path, string path2)
        {
            AssetBundleInfo assetBundleInfo = AssetBundleInfoManager.FindAssetBundleInfo(path);

            //管理テーブルにあるなら、そこから
            if (assetBundleInfo != null)
            {
                return(assetBundleInfo);
            }
            if (string.IsNullOrEmpty(path2))
            {
                return(null);
            }
            assetBundleInfo = AssetBundleInfoManager.FindAssetBundleInfo(path2);
            if (assetBundleInfo != null)
            {
                Debug.Log("find from path2  = " + path2);
                return(assetBundleInfo);
            }
            return(null);
        }