From ff3277edc7d10e88a8cbd9e6a9aacbd90f10c962 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Sun, 22 Jan 2023 21:33:08 -0600 Subject: [PATCH] Change CM attributes to not check inhereted class. --- Source/Editor/Windows/Assets/PrefabWindow.Hierarchy.cs | 2 +- Source/Editor/Windows/ContentWindow.ContextMenu.cs | 2 +- Source/Editor/Windows/SceneTreeWindow.ContextMenu.cs | 2 +- Source/Editor/Windows/ToolboxWindow.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Editor/Windows/Assets/PrefabWindow.Hierarchy.cs b/Source/Editor/Windows/Assets/PrefabWindow.Hierarchy.cs index 71777dea7..7544100e8 100644 --- a/Source/Editor/Windows/Assets/PrefabWindow.Hierarchy.cs +++ b/Source/Editor/Windows/Assets/PrefabWindow.Hierarchy.cs @@ -253,7 +253,7 @@ namespace FlaxEditor.Windows.Assets if (actorType.IsAbstract) continue; ActorContextMenuAttribute attribute = null; - foreach (var e in actorType.GetAttributes(true)) + foreach (var e in actorType.GetAttributes(false)) { if (e is ActorContextMenuAttribute actorContextMenuAttribute) { diff --git a/Source/Editor/Windows/ContentWindow.ContextMenu.cs b/Source/Editor/Windows/ContentWindow.ContextMenu.cs index b8b289e08..64d9b6d37 100644 --- a/Source/Editor/Windows/ContentWindow.ContextMenu.cs +++ b/Source/Editor/Windows/ContentWindow.ContextMenu.cs @@ -162,7 +162,7 @@ namespace FlaxEditor.Windows // Get attribute ContentContextMenuAttribute attribute = null; - foreach (var typeAttribute in type.GetAttributes(true)) + foreach (var typeAttribute in type.GetAttributes(false)) { if (typeAttribute is ContentContextMenuAttribute contentContextMenuAttribute) { diff --git a/Source/Editor/Windows/SceneTreeWindow.ContextMenu.cs b/Source/Editor/Windows/SceneTreeWindow.ContextMenu.cs index 75f31bfd6..e48e59f80 100644 --- a/Source/Editor/Windows/SceneTreeWindow.ContextMenu.cs +++ b/Source/Editor/Windows/SceneTreeWindow.ContextMenu.cs @@ -66,7 +66,7 @@ namespace FlaxEditor.Windows if (actorType.IsAbstract) continue; ActorContextMenuAttribute attribute = null; - foreach (var e in actorType.GetAttributes(true)) + foreach (var e in actorType.GetAttributes(false)) { if (e is ActorContextMenuAttribute actorContextMenuAttribute) { diff --git a/Source/Editor/Windows/ToolboxWindow.cs b/Source/Editor/Windows/ToolboxWindow.cs index 434647280..445a7d778 100644 --- a/Source/Editor/Windows/ToolboxWindow.cs +++ b/Source/Editor/Windows/ToolboxWindow.cs @@ -250,7 +250,7 @@ namespace FlaxEditor.Windows foreach (var actorType in Editor.CodeEditing.Actors.Get()) { ActorToolboxAttribute attribute = null; - foreach (var e in actorType.GetAttributes(true)) + foreach (var e in actorType.GetAttributes(false)) { if (e is ActorToolboxAttribute actorToolboxAttribute) {