言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

EditorUtility.SetSelectedWireframeHidden

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static function SetSelectedWireframeHidden(renderer: Renderer, enabled: bool): void;
public static void SetSelectedWireframeHidden(Renderer renderer, bool enabled);
public static def SetSelectedWireframeHidden(renderer as Renderer, enabled as bool) as void

Description

レンダラーを持つゲームオブジェクトを選択している時に、レンダーラーのワイヤーフレームを非表示にします


Cubeの持つワイヤーフレームを非表示/表示

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

	// SetSelectedWireFrameHidden

	class ShowHideWireFrame extends Editor {

		@MenuItem("Examples/Show WireFrame %s")
		static function Show() {
			for (var s : GameObject in Selection.gameObjects)
				if(s.renderer)
					EditorUtility.SetSelectedWireframeHidden(s.renderer, 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)
				if(h.renderer)
					EditorUtility.SetSelectedWireframeHidden(h.renderer, true);
		}
		@MenuItem("Examples/Hide WireFrame %h", true)
		static function CheckHide() {
			return Selection.activeGameObject != null;
		}
	}