From 7487b468d344f5341c2bc563f09a97f788381699 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Wed, 2 Nov 2022 18:37:11 -0500 Subject: [PATCH] added extra checks --- Source/Editor/Windows/ContentWindow.ContextMenu.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Editor/Windows/ContentWindow.ContextMenu.cs b/Source/Editor/Windows/ContentWindow.ContextMenu.cs index 36d3e4938..db4ed13d8 100644 --- a/Source/Editor/Windows/ContentWindow.ContextMenu.cs +++ b/Source/Editor/Windows/ContentWindow.ContextMenu.cs @@ -157,9 +157,9 @@ namespace FlaxEditor.Windows // loop through each proxy and user defined json type and add them to the context menu foreach (var type in Editor.CodeEditing.All.Get()) { - if (type.IsAbstract || !type.HasAttribute(typeof(ContentContextMenuAttribute), true)) + if (type.IsAbstract || !type.HasAttribute(typeof(ContentContextMenuAttribute), true) || Editor.CodeEditing.Actors.Get().Contains(type) || Editor.CodeEditing.Scripts.Get().Contains(type)) continue; - + ContentContextMenuAttribute attribute = null; foreach (var typeAttribute in type.GetAttributes(true)) {