| center | 円の中心 |
| normal | 円の法線 |
| radius | The radius of the dics 注意: 画面サイズに対して固定サイズのハンドルを持ちたい場合、 HandleUtility.GetHandleSize を使用します。 |
中の空間まで色のついた、フラットな円を 3D 空間に描画します。
Solid Disc in the Scene View.
// Create a semi transparent white disc with a ScaleValueHandle attached to the disc
// that lets you modify the "areaOfEffect" var in the WireDiscExample.js
@CustomEditor (SolidDiscExample)
class DrawSolidDisc extends Editor {
function OnSceneGUI () {
Handles.color = Color(1,0,0,0.1);
Handles.DrawSolidDisc(target.transform.position, Vector3.up, target.areaOfEffect);
Handles.color = Color.red;
target.areaOfEffect =
Handles.ScaleValueHandle(target.areaOfEffect,
target.transform.position + Vector3(target.areaOfEffect,0,0),
Quaternion.identity,
2,
Handles.CylinderCap,
2);
}
}
このハンドルにアタッチしているスクリプト
//SolidDiscExample.js
var areaOfEffect : float = 5;