using editor's built in progress bar

when you bake the light map for example, there is a progress bar on the lower right side of the editor window, is there anyway to use it from custom editor scripts? I don’t want to create my own progress bar but to use the same one unity already has. is there any way to do it?
thanks

The progressbar of the lightmap baking process inside the “status bar” is handled by an internal class called AppStatusBar. It’s a GUIView that is part of the main application window. The progressbar is controlled by another internal class called AsyncProgressBar. This class just has external properties. The Editor application itself is still a native application so there’s no way to access those properties, even with reflection.

The built-in ways to display a progressbar are:

edit
I just had another look at the internal “AsyncProgressBar” class and yes, it seems @Jiraiyah is right. I somehow overlooked that “Display” method since all properties an methods are declared external i didn’t think there was any way. However it seems to work pretty much the same way the EditorUtility progressbar works. I’ve quickly written the following class and it seems to work. But keep in mind that this is not a clean solution since it uses reflection to access an internal class. It’s not ment to be used and can change in the future and might even break other things.

using UnityEngine;
using UnityEditor;
using System.Linq;
using System.Reflection;

public static class EditorProgressBar
{
    static MethodInfo m_Display = null;
    static MethodInfo m_Clear = null;
    static EditorProgressBar()
    {
        var type = typeof(Editor).Assembly.GetTypes().Where(t => t.Name == "AsyncProgressBar").FirstOrDefault();
        if (type != null)
        {
            m_Display = type.GetMethod("Display");
            m_Clear = type.GetMethod("Clear");
        }
    }

    public static void ShowProgressBar(string aText, float aProgress)
    {
        if (m_Display != null)
            m_Display.Invoke(null, new object[] { aText, aProgress });
    }
    public static void ClearProgressBar()
    {
        if (m_Clear != null)
            m_Clear.Invoke(null, null);
    }
}

Hmm AsyncProgressBar has a public static extern method called Diplay that accepts string and float, why wouldn’t I be able to invoke that method via reflection ? (new to reflection stuff so it may be a noob question) is that because it is extern?

isn’t this the method responsible of drawing the progress there?