文档

Unity Engine

Unity Engine

PixelAdjustPoint(Vector2, Transform, Canvas)

Convert a given point in screen space into a pixel correct point.
阅读时间1 分钟最后更新于 21 天前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.UIModule
public static Vector2 PixelAdjustPoint(Vector2 point, Transform elementTransform, Canvas canvas)

Parameters

point

Point to adjust, in the local space of the element.

elementTransform

Transform of the element that the point belongs to.

canvas

Canvas that contains the element.

Returns

Type

Description

Vector2Pixel adjusted point.