Fix rich text box images from name in cooked build

This commit is contained in:
Wojciech Figat
2022-08-08 11:48:36 +02:00
parent 0eba11f1eb
commit 183e87d147

View File

@@ -279,7 +279,9 @@ namespace FlaxEngine.GUI
var ids = Content.GetAllAssetsByType(type);
foreach (var id in ids)
{
if (Content.GetAssetInfo(id, out var info) && string.Equals(name, System.IO.Path.GetFileNameWithoutExtension(info.Path), System.StringComparison.OrdinalIgnoreCase))
var path = Content.GetEditorAssetPath(id);
if (!string.IsNullOrEmpty(path) &&
string.Equals(name, System.IO.Path.GetFileNameWithoutExtension(path), System.StringComparison.OrdinalIgnoreCase))
{
return Content.LoadAsync(id, type);
}