Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


NormalizedToPoint(Rect, Vector2)

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

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
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
.