Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetScreenRect

Returns bounding rectangle of GUIElement in screen coordinates.
Read time 1 minuteLast updated 3 days ago

Definition

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

GetScreenRect(Camera)

Returns bounding rectangle of GUIElement in screen coordinates.
public Rect GetScreenRect(Camera camera)

Parameters

camera

Returns

Type

Description

Rect

Remarks

If no
camera
is given a camera filling the entire game window will be assumed.

GetScreenRect()

Returns bounding rectangle of GUIElement in screen coordinates.
public Rect GetScreenRect()

Returns

Type

Description

Rect

Remarks

If no
camera
is given a camera filling the entire game window will be assumed.