EditorUtility.DisplayCancelableProgressBar Issue (2020 and Beyond Only)

With Unity 2020, better progress tracking was introduced for many Editor operations, such as asset importing. However, this has introduced a new problem, which is interoperability with custom Editor Scripts that rely on EditorUtility.DisplayCancelableProgressBar and EditorUtility.DisplayProgressBar to display a useful progress bar to its users for blocking operations.

Prior to 2020, these methods worked flawlessly.

viciousafraidelectriceel

However, now that Unity has introduced progress tracking and it appears that that tracking also utilizes those methods, Unity’s progress tracking and the users progress tracking are competing for the right to show the progress window. This results in the users progress tracking not being as clear as it was previously. My progress window is still shown, but it is overwritten by Unity’s progress tracking, so that the window switches back and forth between what I want to show and what Unity wants to show.

delayedconcernedhammerheadbird

Does anyone know a work around for this? The main culprit on Unity’s side that I can see is when importing an asset, which I need to do for my Editor tool. I already incorporate the progress of this operation in my own progress; I don’t need Unity to show its own progress for the process.

The best thing I can think of is for Unity to stop using the public DisplayProgressBar and DisplayCancelableProgressBar windows. I am not sure how they did not anticipate the conflict that would occur with them doing so.

Having the same issue over here. Did you ever find a solution? Basically all my progress bars are f**** up because of this.

No, I never did unfortunately. Let us know if you come up with a solution!

1 Like

For anyone looking for an answer to this, I worked around it by calling “AssetDatabase.StartAssetEditing();” before creating/editing any assets and calling “AssetDatabase.StopAssetEditing();” once you are finished. It stops automatic importing for every asset that was changed. Upon calling StopAssetEditing(), Unity imports all changes in one big batch.