Skip to content

Instantly share code, notes, and snippets.

@GordeyChernyy
Last active August 21, 2017 16:04
Show Gist options
  • Save GordeyChernyy/aebcfd0082bb8530093dcf277f2759eb to your computer and use it in GitHub Desktop.
Save GordeyChernyy/aebcfd0082bb8530093dcf277f2759eb to your computer and use it in GitHub Desktop.
Unity Editor script for hide/unhide selected. Put this script into Assets/Editor folder
using UnityEngine;
using UnityEditor;
public class KeyboardShortcuts : EditorWindow {
[MenuItem("Window/KeyboardShortcuts/1 _h", false, 999)]
static void HideSelection () {
foreach (GameObject obj in Selection.gameObjects) {
if ( obj.activeSelf) {
obj.SetActive (false);
}
else {
obj.SetActive (true);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment