public static GetFileStreamingOutAssetsPath ( ) : string | ||
return | string |
/// <summary> /// Builds the asset bundles update A. /// </summary> public static void buildAssetBundlesUpdateAB() { EditorUtility.DisplayProgressBar("Generate FileList", "loading bundle manifest", 1 / 2); AssetDatabase.Refresh(); string readPath = BuildScript.GetFileStreamingOutAssetsPath();// 读取Streaming目录 var u3dList = getAllChildFiles(readPath, @"\.meta$|\.manifest$|\.DS_Store$|\.u$", null, false); List <string> assets = new List <string>(); foreach (var s in u3dList) { string ab = GetAssetPath(s); //s.Replace(readPath, "").Replace("/", "").Replace("\\", ""); assets.Add(ab); } readPath = BuildScript.GetLuaBytesResourcesPath();// 读取lua 目录 u3dList = getAllChildFiles(readPath, @"\.bytes$", null); foreach (var s in u3dList) { string ab = GetAssetPath(s); //s.Replace(readPath, "").Replace("/", "").Replace("\\", ""); assets.Add(ab); } EditorUtility.ClearProgressBar(); CUtils.DebugCastTime("Time Generate FileList End"); Debug.Log("all assetbundle count = " + assets.Count); BuildScript.GenerateAssetBundlesUpdateFile(assets.ToArray()); CUtils.DebugCastTime("Time GenerateAssetBundlesUpdateFile End"); }
/// <summary> /// Builds the asset bundles update A. /// </summary> public static void buildAssetBundlesUpdateAB() { EditorUtility.DisplayProgressBar("Generate FileList", "loading bundle manifest", 1 / 2); AssetDatabase.Refresh(); string readPath = BuildScript.GetFileStreamingOutAssetsPath();//+"\\"; var u3dList = getAllChildFiles(readPath, @"\.meta$|\.manifest$|\.DS_Store$", null, false); Debug.Log("all ab count = " + u3dList.Count); List <string> assets = new List <string>(); foreach (var s in u3dList) { string ab = CUtils.GetAssetBundleName(s); //s.Replace(readPath, "").Replace("/", "").Replace("\\", ""); // Debug.Log(ab); assets.Add(ab); } EditorUtility.ClearProgressBar(); BuildScript.GenerateAssetBundlesUpdateFile(assets.ToArray()); }