RectTransformUtilityを使ってスクリーン座標をRectTransform上ののローカル座標やワールド座標に変換する方法です。 スクリーン座標をRectTransform上のUIのローカル座標に変換する スクリーン座標をRectTransform平面上のワールド座標に変換する ワールド座標をスクリーン座標に変換 参考 Unity2018.3.1 スクリーン座標をRectTransform上のUIのローカル座標に変換する スクリーン座標をUIのローカル座標に変換するにはRectTransformUtility.ScreenPointToLocalPointInRectangleを使います。 これは、スクリーン座標を引数に与えたRectTransform平面上の点に変換します。 using UnityEngine; using UnityEngine.UI; [RequireC
