0.6.1: Fixed issue, where ui toolbar options weren't availabe in play mode

This commit is contained in:
Anders Ejlersen 2021-04-12 11:57:03 +02:00
parent 169d11a2dd
commit 2a875eda93
3 changed files with 3 additions and 3 deletions

View file

@ -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;

View file

@ -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()

View file

@ -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",