Skip assets from temporary folder in Content Search
This commit is contained in:
@@ -468,6 +468,7 @@ namespace FlaxEngine.Windows.Search
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Iterate over all assets
|
// Iterate over all assets
|
||||||
|
var tempFolder = StringUtils.NormalizePath(Path.GetDirectoryName(Globals.TemporaryFolder));
|
||||||
for (var i = 0; i < assets.Length && !_token.IsCancellationRequested; i++)
|
for (var i = 0; i < assets.Length && !_token.IsCancellationRequested; i++)
|
||||||
{
|
{
|
||||||
var id = assets[i];
|
var id = assets[i];
|
||||||
@@ -476,6 +477,8 @@ namespace FlaxEngine.Windows.Search
|
|||||||
continue;
|
continue;
|
||||||
if (!validTypeNames.Contains(assetInfo.TypeName))
|
if (!validTypeNames.Contains(assetInfo.TypeName))
|
||||||
continue;
|
continue;
|
||||||
|
if (assetInfo.Path.StartsWith(tempFolder))
|
||||||
|
continue;
|
||||||
// TODO: implement assets indexing or other caching for faster searching
|
// TODO: implement assets indexing or other caching for faster searching
|
||||||
var asset = Content.LoadAsync(id);
|
var asset = Content.LoadAsync(id);
|
||||||
if (asset == null)
|
if (asset == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user