- Home /
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?
Answer by Bunny83 · May 02, 2011 at 10:55 AM
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.
- Just set Renderer.enabled to false.
- Disable the whole GameObject (.active).
- Create a layer that you disable in the sceneview and put your object on that layer via script.
No I want to hide just the wireframe of the selected object and its children. I don't want to hide the actual game objects. The SetSelectedWireframeHidden method takes in a renderer as its first parameter, hence my reference to "renderers" above, I see how that could be confusing, sorry.
Ahh, ok :D, well i just found out that my Unity version doesn't even support that function ;D. It has been implemented in 3.2 and we're still using 3.0. $$anonymous$$aybe this function still have some bugs since it's quite new. http://unity3d.com/support/documentation/ScriptReference/40_history.html#3.2.0
Your answer
Follow this Question
Related Questions
WebCamTexture performance issue. 1 Answer
Debug Console doesnt show up 7 Answers
Unity3D gibberish in menus 1 Answer
Editor menus are invisible 1 Answer
Tons of weird Script compilation errors / editor delays 0 Answers