Exemplo n.º 1
0
    /// <summary>
    /// Builds the asset bundles update A.
    /// </summary>
    public static void buildAssetBundlesUpdateAB()
    {
        EditorUtility.DisplayProgressBar("Generate FileList", "loading bundle manifest", 1 / 2);

        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());
    }