From 9ef5c35e52f01e7ff9f2ccfe4e6bdd1fa5931cea Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 8 Nov 2021 23:46:59 +0100 Subject: [PATCH] Set GraphicsResource Name when loading assets using RawContentManager --- CHANGELOG.md | 1 + MLEM.Data/Content/RawContentManager.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bde90ec..0611ecf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ Additions Improvements - Use TitleContainer for opening streams where possible +- Set GraphicsResource Name when loading assets using RawContentManager ## 5.1.0 ### MLEM diff --git a/MLEM.Data/Content/RawContentManager.cs b/MLEM.Data/Content/RawContentManager.cs index 70576b0..9c15956 100644 --- a/MLEM.Data/Content/RawContentManager.cs +++ b/MLEM.Data/Content/RawContentManager.cs @@ -67,6 +67,8 @@ namespace MLEM.Data.Content { this.LoadedAssets[assetName] = t; if (t is IDisposable d && !this.disposableAssets.Contains(d)) this.disposableAssets.Add(d); + if (t is GraphicsResource r) + r.Name = assetName; return t; } } catch (FileNotFoundException) {