Hide/Show/Isolate Selection tool available!

Now available in the asset store for $20, the Hide/Show/Isolate selection tool!

> Watch the video

Ever found yourself working in a complicated scene and thinking to yourself, ‘main, it would be so useful if I could just hide some of these objects, or just isolate the selection like I would in 3dsmax…’. Well, now there’s a way with the HideShow/Isolate Selection tool! A ‘Selection’ menu will allow you to hide, or show, or isolate you’re current selection. A message will appear on your screen to let you know that you aren’t seeing the whole scene.

To stop unwanted renderers becoming visible when you click ‘Show all’, I create a hidden game called that I call the ‘HiddenObjectsManager’, which holds a list of all the hidden renderers. This means you can save your scene and load it again later with the selection still isolated, and if you hit run all your hidden objects will become visible again!

This is the first version and while I’ve done lots of testing I cant guarantee its bug free. If you find a bug, please post on my youtube account, or in this thread.

Also I’m currently working on a tool that allows you to lock a selection. That is, you click on an object, and it will select the objects behind it instead. I may even be able to make it so if you click a selected object and hold a button, it selects the one behind that - which could make selecting objects in a busy scene a lot easier! So look out for the lock selection tool.

Thanks for reading!

I like the tool but one thing i noticed that some of the tools, there’s no shortcut. Would be good if there’s some form of shortcut which will makes the work flow easier than always clicking in selection > then the tools. :smile: But this is def useful just like in max where i can isolate selection.

I made Alt + Q perform the isolation. Most of the keyboard shortcuts are for things that toggle for better work flow. Otherwise, people can always edit the source code to include their own shortcuts for specific functions. But thanks for the feedback, I’ll add shortcuts for the others next version :slight_smile:

Do you guys think that $20 is too much for a tool like this? I haven’t sold a single copy yet according to my stats, and well…a couple of sales would help my financial situation a bit heh… I know some assets in the asset store are over 100+ so I thought $20 would be a decent enough price.

Whats considered a good number of sales for something on the asset store by the way?

Hmm, maybe you could lower the price a little and see if anyone buys. Kind of like a promotional period and when sales are getting better, maybe you can set it back to 20 dollars. Just my 2 cents.

2divide!: Tool is interesting (i am considering to buy it), but do you know what is problem? Almost nobody is doing here serious games with complex scenes, so they dont need it.

How does it work? Are you disabling mesh renderer?

Well I wouldn’t say its only useful for complex games…I found it useful for small projects as well…especially 2d games where stuff gets in the way of other stuff when you’re in orthographic view. Anyway I’m working on a ‘lock’ and ‘unlock’ system, as well as a ‘click to select the object behind’ so I think if I bundle that functionality in there as well then it might make it more appealing. Personally I would love this kind of functionality to be built into Unity, but until then I make do with this.

How does it work? Well I considered a lot of things such as disabling the game object, but I decided the best way was to simply disable the mesh renderer. To be precise, I disable all ‘renderer’ components in the selected objects, and any ‘terrain’ components as well (as terrain doesn’t inherit from renderer despite rendering stuff). This means that things like lights wont get hidden, which I think is a good thing because typically if you isolate a selection you dont want everything becoming unlit.

As well as renderers and terrains, i also modify the hide flags, which makes the objects hidden in the hierachy. This is great because if you have a big level and you want to link objects together, you can just select the 2 objects, isolate them, and only the 2 will be in the hierarchy - making working in big scenes a lot easier.

I also do some other nifty stuff, like create a game object that has a GUIText which displays text like ‘Some objects are hidden’ so that you know your not viewing the whole scene.

When you hit play, anything hidden automatically becomes visible.

If you save the scene, close it, and then load it again later, the scene will remember what objects were hidden.

If you have some renderers enabled and some disabled in your scene (such as invisible collision boxes etc) , I actually keep a list of things that my script has enabled and disabled, so that ensures that invisible shapes dont accidentally reappear when you click show all.

I tested it in the bootcamp scene and it successfully isolated some objects and the game ran the same. Ive also tested it in some of my own projects.

The Lock/Unlock stuff I’m working on uses editor flags, which is great because it prevents prefab instances from breaking etc. I remember watching a unity lecture where someone was dynamically adding a ‘deselect’ script to objects that they wanted to lock, but it seemed inefficient and adding a component in the editor to a prefab will break the connection (at least in 3.4).

Anyway, I have some ideas for other things to make. I think people seem to be more attracted to things that can make their game cooler rather than things which can improve their productively, after all Unity is already pretty rapid for developing things.

It looks like a really useful tool, actually… but $20 does feel a bit high, especially if it’s for a studio with multiple Unity licenses running (and a lot of the big scenes will likely be created by multiple people).

Ideally, though, this is something that would be best added to Unity itself… would they be interested in buying it outright for a future version?

In Unity 4, you will get these warnings:

Assets/HideShowSelection/Editor/HideShowSelection.cs(232,49): warning CS0618: UnityEngine.GameObject.active' is obsolete: GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.

Assets/HideShowSelection/Editor/HideShowSelection.cs(232,28): warning CS0618: UnityEngine.GameObject.active' is obsolete: GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.’

Assets/HideShowSelection/Editor/HideShowSelection.cs(233,49): warning CS0618: UnityEngine.GameObject.active' is obsolete: GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.’

Assets/HideShowSelection/Editor/HideShowSelection.cs(233,28): warning CS0618: UnityEngine.GameObject.active' is obsolete: GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.’


Assets/HideShowSelection/HiddenObjectsManager.cs(68,65): warning CS0618: UnityEngine.GameObject.active' is obsolete: GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.’

Assets/HideShowSelection/HiddenObjectsManager.cs(68,44): warning CS0618: UnityEngine.GameObject.active' is obsolete: GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.’

Assets/HideShowSelection/HiddenObjectsManager.cs(69,65): warning CS0618: UnityEngine.GameObject.active' is obsolete: GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.’

Assets/HideShowSelection/HiddenObjectsManager.cs(69,44): warning CS0618: UnityEngine.GameObject.active' is obsolete: GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.’

Hey great idea, man :slight_smile: Looks good :slight_smile:

this tool still throws warnings:

Assets/HideShowSelection/Editor/HideShowSelection.cs(172,22): warning CS0618: UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.’

Also I can’t seem to select anything in the scene view while isolation mode, and isolating doesn’t include children.

I just bougt this asset and it works…somewhat.
The publisher didn’t leave a contact/support address, so I have to do it this way.
If you select an object and use ‘Isolate selection’, the object and it’s children are correctly isolated: but you can’t select and thus edit the children!
This makes it sortof useless…

Also it generates a lot of ‘`UnityEditor.Undo.RegisterSceneUndo(string)’ is obsolete:’ warnings. Perhaps it has something to do with this?

So please dear publisher; update this asset. Or remove it from the store and give me a refund.

I’ve uploaded a video to show what I mean: http://youtu.be/xb-1IEHu3jM