Update Editor/PropertyDrawer/SerializableFuncBasePropertyDrawer.cs
This commit is contained in:
@@ -442,6 +442,13 @@ namespace UnityUtilities.SerializableDataHelpers.UnityEditorUtilities
|
|||||||
genericMenu.AddSeparator("");
|
genericMenu.AddSeparator("");
|
||||||
|
|
||||||
Type[] funcParameters = GetFuncTypeArguments(data.FuncProperty);
|
Type[] funcParameters = GetFuncTypeArguments(data.FuncProperty);
|
||||||
|
|
||||||
|
if (target is ScriptableObject targetScriptableObject)
|
||||||
|
{
|
||||||
|
DrawMenuForComponent(genericMenu, data, targetScriptableObject, funcParameters);
|
||||||
|
return genericMenu;
|
||||||
|
}
|
||||||
|
|
||||||
Component[] components = ((GameObject)target).GetComponents<Component>();
|
Component[] components = ((GameObject)target).GetComponents<Component>();
|
||||||
|
|
||||||
DrawMenuForComponent(genericMenu, data, (GameObject)target, funcParameters);
|
DrawMenuForComponent(genericMenu, data, (GameObject)target, funcParameters);
|
||||||
|
|||||||
Reference in New Issue
Block a user