Fix error during new json asset creation via ContentContextMenu if the class is missing empty constructor

#1838
This commit is contained in:
Wojtek Figat
2023-11-07 16:21:48 +01:00
parent 7d43a0cc8b
commit 0d85094ebb

View File

@@ -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);