FREE: Editor enhancements - Extensions in project window! Components in heirarchy!

HELLO!

Over the past couple of days I worked on some editor enhancements to the Project and Heirarchy windows.

Project Window

  • Shows file extensions (can be set to only show them when duplicate filenames are present)
  • Has a pop-up quick preview if you hold the mouse over an item
  • ‘Useful’ tooltips are also shown per item

Heirarchy Window

  • Shows icons for each component on the gameobject, which can be disabled/enabled by clicking
  • Has a pop-up quick preview if you hold the mouse over a gameobject or one of it’s components
  • ‘Useful’ tooltips are also shown per item and per component

Settings
There are some settings in Edit / Preferences / Project Window Heirarchy Window - however they’re kinda broken at the moment. For example, you can set the Project Window not to show all the extensions, in which case it will only show them if there are two or more files with the same name :slight_smile:

Installation
You can grab a ZIP of the code here: EditorEnhancements.zip - just copy the EditorEnhancements folder into your Assets folder. The bitbucket repository for the code is here.

I have tested on Unity 3.5.5, and Unity 4b7.

Please tell me how you get on with it, and if you want anything else added :slight_smile:

Versions
1st Sep - Supports missing scripts better, no longer truncates icons, and toggling components via their icons is now undo-able.
1st Sep B - Quick asset preview if you hover the mouse in the project window. Also strikeout hierarchy items if they’re not visible in the scene view due to layer settings.
5th Sep - Now has a quick preview window if you hover over gameobjects or their components in the hierarchy window.

1 Like

Works great, I love the Hierarchy one and being able to quickly shut off a part of an item for testing purposes.

Thanks for trying it out :slight_smile: - I added Undo support for the toggling in the latest version.

hey this works great! This should be native in unity!
thanks! :slight_smile:

You’re welcome!

Tenebrous, you are the men!!! This is a great extension!
Thanks a lot! :slight_smile:

Thanks a lot man! Very useful… very!

EDIT:… but: when i click on your icons in the Heirarchy Window, they DO work, but Unity jumps from the scene view to game view.

Well spotted! I’ll try and address this soon :slight_smile:

Seems like in HierarchyWindow.cs the function

private static EditorWindow HeirarchyWindow

doesn’t really find the hierarchy window. In my case it was returning the Inspector window, so on toggle the focus jumps on the inspector. However, there’s no need to change the focus on toggle, so you can remove that part from code or just comment it out like this:

if( GUI.Button( iconRect, new GUIContent( "", tooltip ), EditorStyles.label ) )
{
	c.SetEnabled( !c.GetEnabled() );
	//heirarchyWindow.Focus();
	//EditorApplication.RepaintHierarchyWindow();
	return;
}

But then the Inspector window doesn’t update check boxes on collapsed components! Which is weird… There’s an easy fix for that too. Near the end in function SetEnabled make sure you also call SetDirty like this:

		public static void SetEnabled( this Component pComponent, bool bNewValue )
		{
			if( pComponent == null )
				return;

			Undo.RegisterUndo( pComponent, bNewValue ? "Enable Component" : "Disable Component" );

			PropertyInfo p = pComponent.GetType().GetProperty( "enabled", typeof( bool ) );

			if (p != null)
			{
				p.SetValue(pComponent, bNewValue, null);
				EditorUtility.SetDirty(pComponent.gameObject); // <- ADD THIS LINE
			}
		}

Thanks for this :slight_smile: I’ve already fixed the code to get hierachy window not actually getting the right window, and the same applied to the project window too. I’ve also gotten it to refresh properly on Unity4. Once I’ve added the SetDirty as well I’ll commit the code to bitbucket :slight_smile:

Thanks :slight_smile:

Wow…fantastic extension! Thanks!.

Just updated with: Quick asset preview if you hover the mouse in the project window. Also strikeout hierarchy items if they’re not visible in the scene view due to layer settings.

Thanks Tenebrous. This looks great.

If you plan to keep thinking and releasing awesome editor extensions, you should atleast put up a Donate button :slight_smile:

OK! Here it is →

Great stuff!
Never actually knew that I have those methods for the hierarchy and project panels :smile:

Nor did I, 'til AngryAnt mentioned them :slight_smile:

I’ve had a bit of a clash with the inspector, but after couple hours of reflection in vain I didn’t find a decent way to customize things around there without rewriting most of the thing.
Anyway I’ll check AngryAnts talk and do some digging about what can be achieved and if all goes well I’ll share any useful stuff ^^.

Oh this wasn’t from his Unite stuff, it came up during a conversation in the IRC channel.

I stumbled on a talk in tokyo for extending the editor maybe he mentioned something interesting there too.