Search Issue Tracker

Active

Under Consideration for 6000.4.X

Votes

0

Found in

6000.4.0a1

Issue ID

UUM-116381

Regression

No

ADB Search Provider doesn't yield result asynchronously

-

Iterating using AssetDatabase.EnumerateAssets(filter) can be really costly.
{code:java}
var it = AssetDatabase.EnumerateAllAssets(filter);
while (it.MoveNext())
{
    var current = it.Current;
    if (current == null)
    {
        Debug.Log($"null");
    }
    else
    {
        Debug.Log($"Match: {current.name}");
    }
}

{code}
In the above example, MoveNext will return only if a result is found OR if all assets have been iterated on. In big project this leads to big slowdown.

 

Note that this behavior is also seen in the Project browser. 

 

Ideally we would like an iterator that allows to iterate over all assets and that allows to Filter manually. Or that returns a "dummy" invalid Current for each asset that doesn't fulfill the Filter.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.