buildAsset分析(一)——AssetUnit
来源:互联网 发布:恩施二手淘宝 编辑:程序博客网 时间:2024/06/07 05:32
这个文件主要定义了AssetUnit这个数据结构。保存了单个文件的各种信息。AssetUnit.cs:
using UnityEngine;using UnityEditor;using System.Collections;using System.Collections.Generic;public class AssetUnit{ public string mPath; //文件路径相对Asset public string mName; //文件名称,无后缀名称 public string mSuffix; //后缀 public int mLevel; //层数 public int mIndex; //索引 public int mAssetSize; //保存该Asset的打包文件大小 public List<string> mAllDependencies; //所有依赖 public List<AssetUnit> mNextLevelDependencies; //下层依赖 public List<AssetUnit> mDirectUpperDependences; //直接上层依赖,用于判定assetbundle加载后是否可以马上删除 public AssetUnit(string path) { mAssetSize = 0; mPath = path; mName = BuildCommon.getFileName(mPath, true); mSuffix = BuildCommon.getFileSuffix(mName); mLevel = BuildCommon.getAssetLevel(mPath); mAllDependencies = new List<string>(); mNextLevelDependencies = new List<AssetUnit>(); string[] deps = AssetDatabase.GetDependencies(new string[] { mPath }); foreach (string file in deps) { string suffix = BuildCommon.getFileSuffix(file); //if (file == mPath || suffix == "dll" || suffix == "cs") if (file == mPath || suffix == "dll") continue; mAllDependencies.Add(file); } mDirectUpperDependences = new List<AssetUnit>(); }}
阅读全文
0 0
- buildAsset分析(一)——AssetUnit
- buildAsset分析(二)——BuildCommon
- buildAsset分析(三)——BuildAssetBundle
- BuildAsset-场景测试
- adnroid事件分析(一)——touch事件分析
- Reids源码分析(一)——整体结构分析
- MT4客户端通讯分析(一)——登录部分分析
- Lucene6.0分析(一)——数据分析接口
- Symbian学习(一)——分析HelloWorldBasic
- perf_event源码分析(一)——cmd_record
- 商业分析——竞争(一)
- DVFS——基础数据结构分析(一)
- 日志分析常用工具(一) —— awk
- 漫步凸分析一——仿射集
- uboot 命令分析(一) — bootm
- uboot 命令分析(一) — bootm
- uboot 命令分析(一) — bootm
- 需求分析—入门(一)
- 数学建模--粒子群算法模版
- CCF201403-2窗口
- JS中各种this指向问题
- BZOJ 3555 [Ctsc2014]企鹅QQ
- P1321 单词覆盖还原
- buildAsset分析(一)——AssetUnit
- 翻转数组(判断递增递减问题)
- Java 编译后的class文件覆盖注意要点
- 最常用的15大Eclipse开发快捷键技巧
- 名片识别OCR技术介绍
- mybats redis二级缓存扩展
- EasyDemo*Java面试常见题
- python编程练习之四——获取系统内存、CPU、磁盘、平均负载信息并保存到数据库中
- 数组计算机 单点更新和区间查询