Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Any way to hide / override BuildAssetBundle progress bar?

Discussion in 'Editor & General Support' started by goodhustle, Mar 8, 2012.

  1. goodhustle

    goodhustle

    Joined:
    Jun 4, 2009
    Posts:
    310
    I was wondering if there's any way to hide the BuildAssetBundle progress bars so I can show my own instead. I have an editor script that builds quite a few assetbundles, and it's annoying to not be able to just show one progress bar across the entire process.

    I currently am using EditorUtility.DisplayProgressBar, but it never shows up because the LZMA compression progress bars take over.
     
  2. Tim Swan

    Tim Swan

    Joined:
    Apr 24, 2012
    Posts:
    1
    I'd like to disable it as well. Consider this a +1. I've been trying to add a cancellable progress bar, but my bar is visible for such a miniscule amount of time it seems impossible to cancel, due to the compression progress bar (and the "building something for uncompressed player" progress bar).
     
  3. goodhustle

    goodhustle

    Joined:
    Jun 4, 2009
    Posts:
    310
  4. peacefulshade

    peacefulshade

    Joined:
    Jul 25, 2012
    Posts:
    9
    A temporary solution that I did to know the progress of the asset bundle creation process is to create a log file:

    private static void MakeAssetBundles(string _platformExtension, BuildTarget _buildTarget)
    {
    FileInfo bundlesFile = new FileInfo(Application.dataPath + "/Editor/GameAssets/bundleConstruction.xml");
    List<Bundle> bundles = BundlesXMLParser.ParseXML(bundlesFile);

    FileInfo log = new FileInfo(Application.dataPath + "/Editor/GameAssets/buildLog.log");
    log.Delete();
    StreamWriter logOut = log.CreateText();
    logOut.Flush();

    for(int i = 0; i < bundles.Count; i++)
    {
    bundles.CreateAssetBundle(_platformExtension, _buildTarget);
    logOut.WriteLine("Bundle " + bundles.BundlePath + " (" + (i + 1) + " of " + bundles.Count + ") created.");
    logOut.Flush();
    }

    logOut.WriteLine("All bundles created.");
    logOut.Close();
    }

    And to listen to it in the Console App in IOS or win tail in windows.

    Hope this helps