シーンビューの 3D GUI スタイルのためのヘルパー関数
These are mainly mathematical functions that assist in converting between the 3D Scene space and the 2D GUI. The functions are used in the construction of the Unity Editor itself and so using them is a good way to make your own Handles GUIs consistent with Unity's.
acceleration | ドラッグするための重力加速度の値を取得します(読出専用)。 |
niceMouseDelta | ドラッグしているマウスのデルタ(位置の変化量)のフロート値を取得します(読出専用)。 |
niceMouseDeltaZoom | ズームに使ったマウスのデルタ(位置の変化量)を取得します(読出専用)。 |
AddControl | ハンドルから測定した距離を記録します。 |
AddDefaultControl | デフォルトのコントロール ID を追加します。他にない場合に選択されます。 |
CalcLineTranslation | 3D 空間のラインに沿ってマウスをドラッグするマップ |
ClosestPointToArc | 現在のマウス位置に最も近い (3D 空間での ) 円弧のポイントを取得します。 |
ClosestPointToDisc | 現在のマウスの位置に最も近い (3D 空間での) ディスク上の点を取得します。 |
ClosestPointToPolyLine | 現在のマウス位置に (3D 空間で) 最も近いポリライン上のポイントを取得します。 |
DistancePointBezier | ポイントとベジェ曲線の間の距離を計算します。 |
DistancePointLine | ポイントとラインの間の距離を計算します。 |
DistancePointToLine | 2D の a 点と b 点の2点で定義されるラインまでの p 点からの距離 |
DistancePointToLineSegment | 2D の a 点と b 点の2点で定義される線分までの p 点からの距離 |
DistanceToArc | Returns the distance in pixels from the mouse pointer to a 3D section of a disc. |
DistanceToCircle | Returns the distance in pixels from the mouse pointer to a camera facing circle. |
DistanceToCone | Returns the distance in pixels from the mouse pointer to a cone. |
DistanceToCube | Returns the distance in pixels from the mouse pointer to a cube. |
DistanceToDisc | Returns the distance in pixels from the mouse pointer to a 3D disc. |
DistanceToLine | Returns the distance in pixels from the mouse pointer to a line. |
DistanceToPolyLine | Returns the distance in pixels from the mouse pointer to a polyline. |
DistanceToRectangle | Returns the distance in pixels from the mouse pointer to a rectangle on screen. |
FindNearestVertex | Returns the nearest vertex to a guiPoint within a maximum radius of 50 pixels. |
GetHandleSize | 特定の位置でマニピュレーターハンドルのワールド空間のサイズを取得します。 |
GetPickingIncludeExcludeList | Gets the picking PickingIncludeExcludeList for the currently executing BatchRendererGroup.OnPerformCulling callback. |
GetSelectionOutlineIncludeExcludeList | Gets the selection outline PickingIncludeExcludeList for the currently executing BatchRendererGroup.OnPerformCulling callback. |
GUIPointToScreenPixelCoordinate | Converts a 2D GUI position to screen pixel coordinates. |
GUIPointToWorldRay | 2D GUI ポジションをワールド空間のレイに変換します。 |
PickGameObject | 指定したポジションに最も近いゲームオブジェクトを選択します。 |
PickRectObjects | 指定したスクリーンの矩形内にある GameObjects を選択します。 |
PlaceObject | Casts a ray against the loaded scenes and returns the nearest intersected point on a collider. |
PointOnLineParameter | 特定のライン上の point のプロジェクションパラメーターを返します。 |
PopCamera | すべてのカメラ設定をリトリーブします。 |
ProjectPointLine | Point をライン上に投影します。 |
PushCamera | すべてのカメラ設定を保存します。 |
RaySnap | Casts ray against the Scene and reports whether an object lies in its path. |
Repaint | 現在のビューを再描画します。 |
WorldPointToSizedRect | 3D 空間でプロジェクションされたポイント付近に 2D GUI エレメントを表示する矩形を計算します。 |
WorldToGUIPoint | Convert a world space point to a 2D GUI position. |
WorldToGUIPointWithDepth | Convert a world space point to a 2D GUI position. |
getAuthoringObjectForEntity | The user-defined callback that Unity uses to retrieve the Unity Object associated with a DOTS Entity. |
getEntitiesForAuthoringObject | The user-defined callback that Unity uses to retrieve the DOTS Entity IDs associated with a Unity Object. |
pickGameObjectCustomPasses | Subscribe to this event to add additional picking objects to the HandleUtility.PickGameObject method. |
placeObjectCustomPasses | Subscribe to this event to handle object placement in the SceneView. |
PickGameObjectCallback | This is the method definition for pickGameObjectCustomPasses. |
PlaceObjectDelegate | This is the method definition for placeObjectCustomPasses. |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.