public static void DrawWireDisc (Vector3 center, Vector3 normal, float radius);

参数

center圆盘的中心。
normal圆盘的法线。
radius圆盘的半径。

注意:如果您希望拥有恒定屏幕大小的手柄,请使用 HandleUtility.GetHandleSize。

描述

在 3D 空间中绘制一个平面圆盘的轮廓。


Wire Disc in the Scene View.

// Create a wire disc with a ScaleValueHandle attached to the disc
// that lets you drag the "areaOfEffect" var in the WireDiscExample.js

@CustomEditor (WireDiscExample) class DrawWireDisc extends Editor { function OnSceneGUI () { Handles.color = Color.red; Handles.DrawWireDisc(target.transform.position, Vector3.up, target.areaOfEffect);

target.areaOfEffect = Handles.ScaleValueHandle(target.areaOfEffect, target.transform.position + Vector3(target.areaOfEffect,0,0), Quaternion.identity, 2, Handles.CylinderCap, 2); } }

附加到此手柄的脚本:

//WireDiscExample.js

var areaOfEffect : float = 5;