From 12de62dabb2a6b29936f1090020cdf5229653a02 Mon Sep 17 00:00:00 2001 From: Ejlersen Date: Sun, 13 Feb 2022 20:09:41 +0100 Subject: [PATCH] 1.4.1: Fixed issue, where new build tools used unsupported styles in Unity 2019 and 2020 --- Editor/Toolbar/Tools/ToolBuild.cs | 3 ++- Editor/Toolbar/Tools/ToolBuildTargetPicker.cs | 3 ++- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Editor/Toolbar/Tools/ToolBuild.cs b/Editor/Toolbar/Tools/ToolBuild.cs index fd1dd22..5a6c66d 100644 --- a/Editor/Toolbar/Tools/ToolBuild.cs +++ b/Editor/Toolbar/Tools/ToolBuild.cs @@ -61,7 +61,8 @@ namespace Module.NavigationTool.Editor.Toolbar if (GUI.Button(rect1, DROPDOWN, styles.button)) { - EditorUtility.DisplayCustomMenu(rect, CONTENT_LIST, currentSelected, (_, _, selected) => + // Note: Do not discard the parameters: userData and options, since they throw an error in 2019, if there are two of them + EditorUtility.DisplayCustomMenu(rect, CONTENT_LIST, currentSelected, (userData, options, selected) => { if (selected != -1) ToolbarSettings.IsBuildAndRunEnabled = selected == 1; diff --git a/Editor/Toolbar/Tools/ToolBuildTargetPicker.cs b/Editor/Toolbar/Tools/ToolBuildTargetPicker.cs index 20fb23a..fe60ebd 100644 --- a/Editor/Toolbar/Tools/ToolBuildTargetPicker.cs +++ b/Editor/Toolbar/Tools/ToolBuildTargetPicker.cs @@ -49,7 +49,8 @@ namespace Module.NavigationTool.Editor.Toolbar if (GUI.Button(rect, content, styles.buttonNoPadding)) { - EditorUtility.DisplayCustomMenu(rect, TARGET_LIST, SELECTED_INDEX, (_, _, selected) => + // Note: Do not discard the parameters: userData and options, since they throw an error in 2019, if there are two of them + EditorUtility.DisplayCustomMenu(rect, TARGET_LIST, SELECTED_INDEX, (userData, options, selected) => { if (selected != -1 && selected != SELECTED_INDEX) SetBuildTargetTo(selected); diff --git a/package.json b/package.json index 5f1bec9..32a351f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.module.navigationtool", - "version": "1.4.0", + "version": "1.4.1", "displayName": "Module.NavigationTool", "description": "Support for navigation tools, like favorites, history and toolbars", "unity": "2019.2",