Documentation

Unity Engine

Download Unity

Unity Engine

GetScreenRect

Returns bounding rectangle of GUIElement in screen coordinates.
Read time 1 minuteLast updated 2 months 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.