diff --git a/Source/Editor/Content/Proxy/JsonAssetProxy.cs b/Source/Editor/Content/Proxy/JsonAssetProxy.cs index 12a54a030..e9caa96a4 100644 --- a/Source/Editor/Content/Proxy/JsonAssetProxy.cs +++ b/Source/Editor/Content/Proxy/JsonAssetProxy.cs @@ -166,6 +166,18 @@ namespace FlaxEditor.Content /// public override string Name { get; } = Utilities.Utils.GetPropertyNameUI(typeof(T).Name); + private SpriteHandle _thumbnail; + + public SpawnableJsonAssetProxy() + { + _thumbnail = SpriteHandle.Invalid; + } + + public SpawnableJsonAssetProxy(SpriteHandle thumbnail) + { + _thumbnail = thumbnail; + } + /// public override bool CanCreate(ContentFolder targetLocation) { @@ -177,6 +189,12 @@ namespace FlaxEditor.Content { Editor.SaveJsonAsset(outputPath, new T()); } + + /// + public override AssetItem ConstructItem(string path, string typeName, ref Guid id) + { + return _thumbnail.IsValid ? new JsonAssetItem(path, id, typeName, _thumbnail) : base.ConstructItem(path, typeName, ref id); + } /// public override string TypeName { get; } = typeof(T).FullName;