From 2a875eda93720f0cf91b5308425d6a36cc5ef4d5 Mon Sep 17 00:00:00 2001 From: Anders Ejlersen Date: Mon, 12 Apr 2021 11:57:03 +0200 Subject: [PATCH] 0.6.1: Fixed issue, where ui toolbar options weren't availabe in play mode --- Editor/Toolbar/Tools/ToolUICanvasPicker.cs | 2 +- Editor/Toolbar/Tools/ToolUILayerToggle.cs | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Editor/Toolbar/Tools/ToolUICanvasPicker.cs b/Editor/Toolbar/Tools/ToolUICanvasPicker.cs index 1a7ca92..bb3cd1a 100644 --- a/Editor/Toolbar/Tools/ToolUICanvasPicker.cs +++ b/Editor/Toolbar/Tools/ToolUICanvasPicker.cs @@ -12,7 +12,7 @@ namespace Game.NavigationTool.Editor.Tools internal sealed class ToolUICanvasPicker : IToolbarDrawer { public bool Visible => true; - public bool Enabled => !EditorApplication.isPlayingOrWillChangePlaymode; + public bool Enabled => (UTools.visibleLayers & (1 << LayerMask.NameToLayer("UI"))) != 0; public EToolbarPlacement Placement => EToolbarPlacement.Left; private static bool IS_DIRTY = true; diff --git a/Editor/Toolbar/Tools/ToolUILayerToggle.cs b/Editor/Toolbar/Tools/ToolUILayerToggle.cs index 97fcce3..fab5b35 100644 --- a/Editor/Toolbar/Tools/ToolUILayerToggle.cs +++ b/Editor/Toolbar/Tools/ToolUILayerToggle.cs @@ -10,7 +10,7 @@ namespace Game.NavigationTool.Editor.Tools internal sealed class ToolUILayerToggle : IToolbarDrawer { public bool Visible => true; - public bool Enabled => !EditorApplication.isPlayingOrWillChangePlaymode; + public bool Enabled => true; public EToolbarPlacement Placement => EToolbarPlacement.Left; public void Update() diff --git a/package.json b/package.json index 991c728..33758fa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.module.navigationtool", - "version": "0.6.0", + "version": "0.6.1", "displayName": "Module.NavigationTool", "description": "Support for navigation tools, like favorites, history and toolbars", "unity": "2019.2",