Version: 2022.3
言語: 日本語
public delegatevoid CapFunction (int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType);

パラメーター

controlID ハンドルのコントロール ID
position The position of the handle in the space of Handles.matrix.
rotation The rotation of the handle in the space of Handles.matrix.
size ワールドスペースユニットでのハンドルのサイズ
eventType ハンドルを動かすためのイベントタイプ。EventType.LayoutEventType.Repaint イベントを処理します。

説明

例えば、ハンドルを描画するために使用する関数 Handles.RectangleCap

Custom CapFunction has two responsibilities: For EventType.Layout event, call HandleUtility.AddControl to inform Unity about the distance of the handle from mouse position. EventType.Repaint イベントで、実際のハンドルを描画します。