1.4.1: Fixed issue, where new build tools used unsupported styles in Unity 2019 and 2020

This commit is contained in:
Anders Ejlersen 2022-02-13 20:09:41 +01:00
parent 03200cc370
commit 12de62dabb
3 changed files with 5 additions and 3 deletions

View file

@ -61,7 +61,8 @@ namespace Module.NavigationTool.Editor.Toolbar
if (GUI.Button(rect1, DROPDOWN, styles.button)) 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) if (selected != -1)
ToolbarSettings.IsBuildAndRunEnabled = selected == 1; ToolbarSettings.IsBuildAndRunEnabled = selected == 1;

View file

@ -49,7 +49,8 @@ namespace Module.NavigationTool.Editor.Toolbar
if (GUI.Button(rect, content, styles.buttonNoPadding)) 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) if (selected != -1 && selected != SELECTED_INDEX)
SetBuildTargetTo(selected); SetBuildTargetTo(selected);

View file

@ -1,6 +1,6 @@
{ {
"name": "com.module.navigationtool", "name": "com.module.navigationtool",
"version": "1.4.0", "version": "1.4.1",
"displayName": "Module.NavigationTool", "displayName": "Module.NavigationTool",
"description": "Support for navigation tools, like favorites, history and toolbars", "description": "Support for navigation tools, like favorites, history and toolbars",
"unity": "2019.2", "unity": "2019.2",