适用于场景视图样式 3D GUI 的 Helper 函数。
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 | 获取用于拖动值的标准加速度(只读)。 |
nearestControl | The controlID of the nearest Handle to the mouse cursor. |
niceMouseDelta | 获取用于拖动浮点值的精密鼠标增量(只读)。 |
niceMouseDeltaZoom | 获取用于缩放的精密鼠标增量(只读)。 |
AddControl | 记录从手柄到测量点的距离。 |
AddDefaultControl | 为默认控件添加 ID。如果没有其他控件可选,则选择此控件。 |
CalcLineTranslation | 将鼠标拖动映射到沿 3D 空间中一条直线的运动。 |
ClosestPointToArc | 获取弧线(在 3D 空间中)上最接近当前鼠标位置的点。 |
ClosestPointToDisc | 获取圆盘(在 3D 空间中)上最接近当前鼠标位置的点。 |
ClosestPointToPolyLine | 获取折线(在 3D 空间中)上最接近当前鼠标位置的点。 |
DistancePointBezier | 计算点与贝塞尔曲线之间的距离。 |
DistancePointLine | 计算点与线之间的距离。 |
DistancePointToLine | 从 2d 中的一个点 p 到由两个点 a 和 b 定义的一条直线的距离。 |
DistancePointToLineSegment | 从 2d 中的一个点 p 到由两个点 a 和 b 定义的线段的距离。 |
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 | 将 2D GUI 位置转换为屏幕像素坐标。 |
GUIPointToWorldRay | 将 2D GUI 位置转换为世界空间射线。 |
PickGameObject | 选择最接近指定位置的游戏对象。 |
PickRectObjects | 选择位于指定屏幕矩形内的游戏对象。 |
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 | 将世界空间点转换为 2D GUI 位置。 |
WorldToGUIPointWithDepth | 将世界空间点转换为 2D GUI 位置。 |
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. |