Version: 5.5 (switch to 5.6b)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Method group is Obsolete

EditorUtility.SetSelectedWireframeHidden

Obsolete public static void SetSelectedWireframeHidden(Renderer renderer, bool enabled);

Description

Set whether the Renderer's wireframe will be hidden when the renderer's GameObject is selected.


Cube with the wireframe hidden/shown.

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

class ShowHideWireFrame extends Editor {

@MenuItem("Examples/Show WireFrame %s") static function Show() { for (var s : GameObject in Selection.gameObjects) { var rend = s.GetComponent.<Renderer>(); if(rend) EditorUtility.SetSelectedWireframeHidden(rend, false); } } @MenuItem("Examples/Show WireFrame %s", true) static function CheckShow() { return Selection.activeGameObject != null; } @MenuItem("Examples/Hide WireFrame %h") static function Hide() { for (var h : GameObject in Selection.gameObjects) { var rend = h.GetComponent.<Renderer>(); if(rend) EditorUtility.SetSelectedWireframeHidden(rend, true); } } @MenuItem("Examples/Hide WireFrame %h", true) static function CheckHide() { return Selection.activeGameObject != null; } }