Does EditorUtility.SetSelectedWireframeHidden work?

I've tried using EditorUtility.SetSelectedWireframeHidden to hide either a single GameObject renderer as well as all the child renderers of a GameObject, and am having no success doing either. I even took the example script given in the documentation, added it to my project and the show/hide menu options do nothing. Is SetSelectedWireframeHidden simply not working in Unity 3 or am I missing something obvious?

I never used `SetSelectedWireframeHidden` but i think it works like expected. You can't hide a gameobject with it. All it does is when the object is selected the wireframe of the containing meshes are automatically shown. Only in that case you can use SetSelectedWireframeHidden to hide the wireframe overlay. If the object isn't selected SetSelectedWireframeHidden has no effect. It's just a utility to prevent the automatic (wireframe-) highlighting of the mesh.

If you want to hide the GameObject there are multiple ways.

  1. Just set Renderer.enabled to false.
  2. Disable the whole GameObject (.active).
  3. Create a layer that you disable in the sceneview and put your object on that layer via script.