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
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
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.
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:
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 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
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.
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 ^^.