# SetSelectedWireframeHidden(Renderer, bool)

> Sets whether the selected Renderer's wireframe will be hidden when the GameObject it is attached to is selected.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.6/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

> **Warning:**
>
> **Deprecated.** Use EditorUtility.SetSelectedRenderState

```csharp
public static void SetSelectedWireframeHidden(Renderer renderer, bool enabled)
```

### Parameters

**** (\[Renderer]\(/engine/6000.6/script-reference/unityengine/renderer)): **** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)):&#x20;

### Remarks

![EditorUtilitySetSelectedWireframeHidden (SetSelectedWireframeHidden(Renderer, bool))](/api/media?file=/engine/6000.6/media/images/EditorUtilitySetSelectedWireframeHidden.png)

*Cube with the wireframe hidden/shown.*

### Examples

```csharp
using UnityEngine;
using UnityEditor;


// Shows / hides the wireframe of the objects in the Scene.

class ShowHideWireFrame : Editor
{
    [MenuItem("Examples/Show WireFrame %s")]
    static void Show()
    {
        foreach (GameObject obj in Selection.gameObjects)
        {
            Renderer rend = obj.GetComponent<Renderer>();

            if (rend)
            {
                EditorUtility.SetSelectedWireframeHidden(rend, false);
            }
        }
    }

    [MenuItem("Examples/Show WireFrame %s", true)]
    static bool CheckShow()
    {
        return Selection.activeGameObject != null;
    }

    [MenuItem("Examples/Hide WireFrame %h")]
    static void Hide()
    {
        foreach (GameObject obj in Selection.gameObjects)
        {
            var rend = obj.GetComponent<Renderer>();

            if (rend)
            {
                EditorUtility.SetSelectedWireframeHidden(rend, true);
            }
        }
    }

    [MenuItem("Examples/Hide WireFrame %h", true)]
    static bool CheckHide()
    {
        return Selection.activeGameObject != null;
    }
}
```
