Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


NormalizedToPoint

Returns a point inside a rectangle, given normalized coordinates.
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

NormalizedToPoint(Rect, Vector2)

Returns a point inside a rectangle, given normalized coordinates.
public static Vector2 NormalizedToPoint(Rect rectangle, Vector2 normalizedRectCoordinates)

Parameters

rectangle

Rectangle to get a point inside.

normalizedRectCoordinates

Normalized coordinates to get a point for.

Returns

Type

Description

Vector2

Remarks

The rectangle has coordinates between zero and one for the x and y axes. This function will compute the real screen coordinates and return as a
Vector2
.

NormalizedToPoint(Rect, Vector2)

Returns a point inside a rectangle, given normalized coordinates.
public static Vector2 NormalizedToPoint(in Rect rectangle, in Vector2 normalizedRectCoordinates)

Parameters

rectangle

Rectangle to get a point inside.

normalizedRectCoordinates

Normalized coordinates to get a point for.

Returns

Type

Description

Vector2

Remarks

The rectangle has coordinates between zero and one for the x and y axes. This function will compute the real screen coordinates and return as a
Vector2
.