/// <summary> /// 获取所有的资源引用数据信息 /// </summary> public static void UpdateAssetDependenct() { using (new ExecuteTimer("UpdateAssetDependenct")) { //获取所有的资源引用数据信息 data = GetAssetDependenctData(); //刷新存储资源引用数据 BuildUtils.RemoveAsset(EditorGenerate); BuildUtils.SaveAsset(data, EditorGenerate); EditorPrefs.SetBool(ResourceDirty, true); } }
public void Update() { for (int fast = 0; fast < 10; fast++) { if (isPermission && files != null) { if (index < files.Length) { var assetPath = BuildUtils.GetUnityPath(files[index]); var denpendenctList = new DependenctList(); denpendenctList.dependencies = BuildUtils.ExceptScriptAndDll(BuildUtils.GetDependencies(assetPath)); denpendenctList.isdirty = false; data.data.Add(assetPath, denpendenctList); EditorUtility.DisplayProgressBar("正在生成资源依赖图", "进度:" + (index / (float)files.Length) * 100 + "%", ++index / (float)files.Length); } else { Debug.Log(data.data.Count + "HashCode:::" + data.data.GetHashCode()); isPermission = false; EditorUtility.ClearProgressBar(); BuildUtils.RemoveAsset(EditorGenerate); BuildUtils.SaveAsset(data, EditorGenerate); EditorPrefs.SetBool(ResourceDirty, true); data = null; } } } }