Documentation

Unity Engine

Unity Engine

PixelAdjustPoint(Vector2, Transform, Canvas)

Convert a given point in screen space into a pixel correct point.
Read time 1 minuteLast updated 21 days ago

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.