private AssetFileBase AddSub(string path, IAssetFileSettingData settingData)
        {
            AssetFileBase base2;

            if (!this.fileTbl.TryGetValue(path, out base2))
            {
                if (path.Contains(" "))
                {
                    Debug.LogWarning("[" + path + "] contains white space");
                }
                AssetBundleInfo assetBundleInfo = this.AssetBundleInfoManager.FindAssetBundleInfo(path);
                AssetFileInfo   fileInfo        = new AssetFileInfo(path, this.settings, assetBundleInfo);
                base2 = this.StaticAssetManager.FindAssetFile(this, fileInfo, settingData);
                if (base2 == null)
                {
                    base2 = this.CustomLoadManager.Find(this, fileInfo, settingData);
                    if (base2 == null)
                    {
                        base2 = new AssetFileUtage(this, fileInfo, settingData);
                    }
                }
                this.fileTbl.Add(path, base2);
            }
            return(base2);
        }
Example #2
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 #3
0
        // 管理ファイルを追加
        AssetFileBase AddSub(string path, IAssetFileSettingData settingData)
        {
            //管理テーブルにあるなら、そこから
            string        path2 = GetPathChangedSoundExt(path);
            AssetFileBase file  = FindFromTbl(path, path2, settingData);

            if (file != null)
            {
                return(file);
            }

/*			if (path.Contains(" "))
 *                      {
 *                              Debug.LogWarning("[" + path + "] contains white space");
 *                      }
 */         AssetBundleInfo assetBundleInfo = FindAssetBundleInfo(path, path2);
            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);
        }
 private void FindAsset(AssetFileManager mangager, AssetFileInfo fileInfo, IAssetFileSettingData settingData, ref AssetFileBase asset)
 {
     if (this.IsVideoType(fileInfo, settingData))
     {
         asset = new AdvLocalVideoFile(this, mangager, fileInfo, settingData);
     }
 }
Example #5
0
        //	最新バージョン番号でファイル情報を設定
        AssetFileInfo SetFileVersionSub(string path, int version)
        {
            AssetFileInfo fileInfo = GetFileInfoCreateIfMissing(path);

            fileInfo.Version = version;
            return(fileInfo);
        }
Example #6
0
 public AssetFileBase(AssetFileManager mangager, AssetFileInfo fileInfo, IAssetFileSettingData settingData)
 {
     this.FileManager = mangager;
     this.FileInfo    = fileInfo;
     this.FileType    = fileInfo.FileType;
     this.SettingData = settingData;
     this.Priority    = AssetFileLoadPriority.DownloadOnly;
 }
Example #7
0
 //ファイルのロードを上書き
 void FindAsset(AssetFileManager mangager, AssetFileInfo fileInfo, IAssetFileSettingData settingData, ref AssetFileBase asset)
 {
     if (IsVideoType(fileInfo, settingData))
     {
         //宴形式の通常ファイルロード
         asset = new AdvLocalVideoFile(this, mangager, fileInfo, settingData);
     }
 }
Example #8
0
//		AudioClip WriteCacheFileSound { get; }

//		byte[] CacheWriteBytes { get; }

        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="info">ファイル情報</param>
        /// <param name="fileIO">ファイルのIO管理クラス</param>
        public AssetFileWork(AssetFileInfo info, FileIOManagerBase fileIO)
        {
            this.FileName = info.Key;
            this.FileInfo = info;
            this.fileIO   = fileIO;
            this.status   = STAUS.LOAD_WAIT;
            this.Priority = AssetFileLoadPriority.DownloadOnly;
            this.SubFiles = new Dictionary <string, AssetFile>();
        }
Example #9
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="info">ファイル情報</param>
 /// <param name="fileIO">ファイルのIO管理クラス</param>
 internal AssetFileUtage(AssetFileUtageManager manager, AssetFileInfo info, StringGridRow rowData, FileIOManagerBase fileIO)
 {
     this.manager  = manager;
     this.fileIO   = fileIO;
     this.FileName = info.Key;
     this.FileInfo = info;
     this.status   = STAUS.LOAD_WAIT;
     this.Priority = AssetFileLoadPriority.DownloadOnly;
     this.SubFiles = new Dictionary <string, AssetFile>();
     this.RowData  = rowData;
 }
Example #10
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="reader"></param>
        /// <param name="fileVersion">バイナリリーダー</param>
        public static AssetFileInfo ReadOld(BinaryReader reader, AssetFileManagerSettings settings, ConvertFileListManager assetBundleManager)
        {
            string key = reader.ReadString();

            reader.ReadInt32();
            AssetFileInfo info = new AssetFileInfo(key, settings, assetBundleManager);

            info.cacheVersion = reader.ReadInt32();
            info.cachePath    = reader.ReadString();
            reader.ReadInt32();
            return(info);
        }
 public AssetFileBase Find(AssetFileManager mangager, AssetFileInfo fileInfo, IAssetFileSettingData settingData)
 {
     if (this.OnFindAsset != null)
     {
         AssetFileBase asset = null;
         this.OnFindAsset(mangager, fileInfo, settingData, ref asset);
         if (asset != null)
         {
             return(asset);
         }
     }
     return(null);
 }
        private bool IsVideoType(AssetFileInfo fileInfo, IAssetFileSettingData settingData)
        {
            if (fileInfo.FileType != AssetFileType.UnityObject)
            {
                return(false);
            }
            if (settingData is AdvCommandSetting)
            {
                AdvCommandSetting setting = settingData as AdvCommandSetting;
                return(setting.Command is AdvCommandVideo);
            }
            AdvGraphicInfo info = settingData as AdvGraphicInfo;

            return((info != null) && (info.FileType == "Video"));
        }
Example #13
0
        public AssetFileBase FindAssetFile(AssetFileManager mangager, AssetFileInfo fileInfo, IAssetFileSettingData settingData)
        {
            if (Assets == null)
            {
                return(null);
            }
            string      assetName = FilePathUtil.GetFileNameWithoutExtension(fileInfo.FileName);
            StaticAsset asset     = Assets.Find((x) => (x.Asset.name == assetName));

            if (asset == null)
            {
                return(null);
            }

            return(new StaticAssetFile(asset, mangager, fileInfo, settingData));
        }
Example #14
0
        //	指定タイプのキャッシュファイルを全て削除
        void DeleteCacheFileAllSub(AssetFileType type)
        {
            List <string> removeFile = new List <string>();

            foreach (string key in fileInfoTbl.Keys)
            {
                AssetFileInfo fileInfo = fileInfoTbl.GetValue(key);
                if (fileInfo.FileType == type)
                {
                    removeFile.Add(key);
                }
            }
            foreach (string key in removeFile)
            {
                AssetFileInfo fileInfo = fileInfoTbl.GetValue(key);
                //キャッシュファイル削除
                fileInfo.DeleteCache();
                fileInfoTbl.Remove(key);
            }
            WriteCacheTbl();
        }
Example #15
0
 public StaticAssetFile(StaticAsset asset, AssetFileManager mangager, AssetFileInfo fileInfo, IAssetFileSettingData settingData) : base(mangager, fileInfo, settingData)
 {
     this.Asset        = asset;
     base.Text         = this.Asset.Asset as TextAsset;
     base.Texture      = this.Asset.Asset as Texture2D;
     base.Sound        = this.Asset.Asset as AudioClip;
     base.UnityObject  = this.Asset.Asset;
     base.IsLoadEnd    = true;
     base.IgnoreUnload = true;
     if (base.Texture != null)
     {
         this.FileType = AssetFileType.Texture;
     }
     else if (base.Sound != null)
     {
         this.FileType = AssetFileType.Sound;
     }
     else if (base.UnityObject != null)
     {
         this.FileType = AssetFileType.UnityObject;
     }
 }
Example #16
0
 public AdvLocalVideoFile(AdvVideoLoadPathChanger pathChanger, AssetFileManager assetFileManager, AssetFileInfo fileInfo, IAssetFileSettingData settingData) : base(assetFileManager, fileInfo, settingData)
 {
     fileInfo.StrageType = AssetFileStrageType.Resources;
     if (settingData is AdvCommandSetting)
     {
         AdvCommandSetting setting = settingData as AdvCommandSetting;
         string            str     = setting.Command.ParseCell <string>(AdvColumnName.Arg1);
         string[]          args    = new string[] { pathChanger.RootPath, str };
         base.LoadPath = FilePathUtil.Combine(args);
     }
     else
     {
         AdvGraphicInfo info       = settingData as AdvGraphicInfo;
         string         fileName   = info.FileName;
         string[]       textArray2 = new string[] { pathChanger.RootPath, fileName };
         base.LoadPath = FilePathUtil.Combine(textArray2);
     }
 }
Example #17
0
 public SampleCustomFile(AssetFileManager mangager, AssetFileInfo fileInfo, IAssetFileSettingData settingData)
     : base(mangager, fileInfo, settingData)
 {
 }
Example #18
0
 public AssetFileBase FindAssetFile(AssetFileManager mangager, AssetFileInfo fileInfo, IAssetFileSettingData settingData)
 {
Example #19
0
 public AssetFileUtage(AssetFileManager assetFileManager, AssetFileInfo fileInfo, IAssetFileSettingData settingData)
     : base(assetFileManager, fileInfo, settingData)
 {
     this.LoadPath = ParseLoadPath();
 }
Example #20
0
 void FindAsset(AssetFileManager mangager, AssetFileInfo fileInfo, IAssetFileSettingData settingData, ref AssetFileBase asset)
 {
     asset = new SampleCustomFile(mangager, fileInfo, settingData);
 }