ドキュメント

Unity Engine

Unity Engine

SetSelectedWireframeHidden(Renderer, bool)

Sets whether the selected Renderer's wireframe will be hidden when the GameObject it is attached to is selected.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
注意
Deprecated. Use EditorUtility.SetSelectedRenderState
public static void SetSelectedWireframeHidden(Renderer renderer, bool enabled)

Parameters

renderer


enabled

Remarks

EditorUtilitySetSelectedWireframeHidden (SetSelectedWireframeHidden(Renderer, bool))
Cube with the wireframe hidden/shown.

Examples

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; }}