From 0d85094ebb933f34364f71d02afb879a7f017b8f Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 7 Nov 2023 16:21:48 +0100 Subject: [PATCH] Fix error during new json asset creation via `ContentContextMenu` if the class is missing empty constructor #1838 --- Source/Editor/Windows/ContentWindow.ContextMenu.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Editor/Windows/ContentWindow.ContextMenu.cs b/Source/Editor/Windows/ContentWindow.ContextMenu.cs index 1071e6b01..f577a94d3 100644 --- a/Source/Editor/Windows/ContentWindow.ContextMenu.cs +++ b/Source/Editor/Windows/ContentWindow.ContextMenu.cs @@ -192,7 +192,7 @@ namespace FlaxEditor.Windows { p = Editor.ContentDatabase.Proxy.Find(x => x.GetType() == type.Type); } - else + else if (type.CanCreateInstance) { // User can use attribute to put their own assets into the content context menu var generic = typeof(SpawnableJsonAssetProxy<>).MakeGenericType(type.Type);