Created
February 5, 2019 14:43
-
-
Save kobakoto-jy/bea53b531a7c327f6a0991d98c9dd920 to your computer and use it in GitHub Desktop.
Ctrl+LでSceneビューのUILayer表示非表示を切り替える
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if UNITY_EDITOR | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
using System; | |
namespace AILib.Editor | |
{ | |
public class ShortcutContectItems | |
{ | |
[MenuItem("SceneView/UILayerShowHide %L")] | |
static void SceneUILayerShow() | |
{ | |
if((Tools.visibleLayers & (1 << LayerMask.NameToLayer("UI"))) != 0) | |
{ | |
Tools.visibleLayers = ~(1 << LayerMask.NameToLayer("UI")); | |
} | |
else | |
{ | |
Tools.visibleLayers |= (1 << LayerMask.NameToLayer("UI")); | |
} | |
SceneView.RepaintAll(); | |
} | |
} | |
} | |
#endif //UNITY_EDITOR: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment