From 183e87d1474c1c95eb36e67cb35c620ec9b75da9 Mon Sep 17 00:00:00 2001 From: Wojciech Figat Date: Mon, 8 Aug 2022 11:48:36 +0200 Subject: [PATCH] Fix rich text box images from name in cooked build --- Source/Engine/UI/GUI/Common/RichTextBox.Tags.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Engine/UI/GUI/Common/RichTextBox.Tags.cs b/Source/Engine/UI/GUI/Common/RichTextBox.Tags.cs index 3840e6dc8..6d3bbb8f3 100644 --- a/Source/Engine/UI/GUI/Common/RichTextBox.Tags.cs +++ b/Source/Engine/UI/GUI/Common/RichTextBox.Tags.cs @@ -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); }