ドキュメント

Unity Engine

Unity Engine

DistanceToRectangle(Vector3, Quaternion, float)

Returns the distance in pixels from the mouse pointer to a rectangle on screen.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public static float DistanceToRectangle(Vector3 position, Quaternion rotation, float size)

Parameters

position


rotation


size

Returns

Type

Description

float

Remarks

Calculates the screen space distance from the mouse pointer to the rectangle.
Uses the current camera to determine the distance.