Version: Unity 6 Preview (6000.0)
LanguageEnglish
  • C#

CameraProjectionCache.WorldToGUIPoint

Declaration

public Vector2 WorldToGUIPoint(Vector3 worldPoint);

Parameters

worldPoint A point in world space.

Returns

Vector2 A point in GUI space.

Description

Converts a world space point to a 2D GUI position.

Uses the cached camera matrices and viewport to calculate the projection.

See also HandleUtility.WorldToGUIPoint.