- Home /
Hide MeshCollider wireframe when selected
I have an object containing MeshCollider but I don't want to see its mesh in the Scene view when I select the object (I have a lot of handles and other stuff on top of the object). I know that I can hide the standard wireframe by calling
EditorUtility.SetSelectedWireframeHidden(renderer, true);
But it doesn't work for MeshCollider as it wants a renderer. Any other way?
Hmm, I can see that in Unity 3.4 I can hide all $$anonymous$$eshCollider gizmos by deselecting the checkbox in the Gizmos menu. But I want to hide only gizmo of one particular object and I want to do that from a script, so that the user doesn't have to worry about it. Similarly to hiding wireframe of $$anonymous$$eshRenderer.
Answer by Jiven · Sep 25, 2013 at 12:23 AM
Not sure when this was added but as of 4.2.0f4 you can turn the alpha all the way down on your wireframe display in Preferences. Would this work for what you're after?
Edit > Preferences > Colors > Wireframe Active >
Move the (A)lpha slider all the way to the left.
You'll notice my shitty helmet is selected and the rotate gizmo is active.
Answer by jonas-echterhoff · Jun 14, 2011 at 12:47 PM
While this is not an immediate fix, Unity 3.4 (coming very soon) will have an option to turn on or off scene view gizmos by type (ie you can just disable the visualization of the different colliders using checkboxes).
Answer by logicalerror · Jul 22, 2017 at 02:49 PM
You can do myMeshCollider.hideFlags = HideFlags.HideInHierarchy; This prevents it from being shown in the scene
Your answer
![](https://koobas.hobune.stream/wayback/20220612104739im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Green Wireframe Length 1 Answer
Splitting a Mesh into Submeshes 2 Answers
RunTime hole in mesh not working 0 Answers
Mesh collider component doesn't have mesh. 0 Answers
Problem with convex Mesh Colliders 0 Answers