Skip to content

Instantly share code, notes, and snippets.

@kobakoto-jy
Created February 5, 2019 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kobakoto-jy/bea53b531a7c327f6a0991d98c9dd920 to your computer and use it in GitHub Desktop.
Save kobakoto-jy/bea53b531a7c327f6a0991d98c9dd920 to your computer and use it in GitHub Desktop.
Ctrl+LでSceneビューのUILayer表示非表示を切り替える
#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