From f1e2a3beb1b0688c301e207e7e76250fc388198a Mon Sep 17 00:00:00 2001 From: Alexander Filippov Date: Mon, 3 Nov 2025 07:36:58 +0000 Subject: [PATCH] Update Editor/PropertyDrawer/SerializableFuncBasePropertyDrawer.cs --- .../PropertyDrawer/SerializableFuncBasePropertyDrawer.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Editor/PropertyDrawer/SerializableFuncBasePropertyDrawer.cs b/Editor/PropertyDrawer/SerializableFuncBasePropertyDrawer.cs index 0262a47..90af8c1 100644 --- a/Editor/PropertyDrawer/SerializableFuncBasePropertyDrawer.cs +++ b/Editor/PropertyDrawer/SerializableFuncBasePropertyDrawer.cs @@ -442,6 +442,13 @@ namespace UnityUtilities.SerializableDataHelpers.UnityEditorUtilities genericMenu.AddSeparator(""); Type[] funcParameters = GetFuncTypeArguments(data.FuncProperty); + + if (target is ScriptableObject targetScriptableObject) + { + DrawMenuForComponent(genericMenu, data, targetScriptableObject, funcParameters); + return genericMenu; + } + Component[] components = ((GameObject)target).GetComponents(); DrawMenuForComponent(genericMenu, data, (GameObject)target, funcParameters);