パブリック 静的ベクトル2 WorldToCanvasPoint(キャンバスキャンバス、のVector3 worldPos) { ベクトル2のPOS。 RectTransformUtility.ScreenPointToLocalPointInRectangle(canvas.transform としてRectTransform、 Camera.main.WorldToScreenPoint(worldPos)、canvas.worldCamera、アウトPOS)。 返すPOSを。 }
パブリック 静的ベクトル2 WorldToCanvasPoint(キャンバスキャンバス、のVector3 worldPos) { ベクトル2のPOS。 RectTransformUtility.ScreenPointToLocalPointInRectangle(canvas.transform としてRectTransform、 Camera.main.WorldToScreenPoint(worldPos)、canvas.worldCamera、アウトPOS)。 返すPOSを。 }