Hide all objects except selected object in scene view

Can i hide all other objects except currently selected objects in the Scene View in editor? I know we can hide or show object object by setting it active in the inspector but i don’t want to manually and deactivate all other objects except this one.

You need write an editor script for that:

using UnityEngine;
using UnityEditor;
using System.Collections;

[MenuItem ("My Menu/Hide Objects #h")]
	static void HideAllExceptThisOne ()
	{
		GameObject[] all_Objs = GameObject.FindObjectsOfType<GameObject> ();
		GameObject current = Selection.activeGameObject;

		foreach (GameObject g in all_Objs) {
			if (g != current)
				g.SetActive (false);
		}
	}

Create folder “Editor” under your Asset folder and put this script in that. You can “Hide” (Deactivate) all game objects except selected by pressing ‘Shift’ +‘h’ key