Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Suggest a change


Namespace: UnityEngine


Access to display information.

Screen class can be used to get the list of supported resolutions, switch the current resolution, hide or show the system mouse pointer.

Static Variables

autorotateToLandscapeLeft Allow auto-rotation to landscape left?
autorotateToLandscapeRight Allow auto-rotation to landscape right?
autorotateToPortrait Allow auto-rotation to portrait?
autorotateToPortraitUpsideDown Allow auto-rotation to portrait, upside down?
currentResolution The current screen resolution (Read Only).
dpi The current DPI of the screen / device (Read Only).
fullScreen Is the game running fullscreen?
height The current height of the screen window in pixels (Read Only).
lockCursor Should the cursor be locked?
orientation Specifies logical orientation of the screen.
resolutions All fullscreen resolutions supported by the monitor (Read Only).
showCursor Should the cursor be visible?
sleepTimeout A power saving setting, allowing the screen to dim some time after the last active user interaction.
width The current width of the screen window in pixels (Read Only).

Static Functions

SetResolution Switches the screen resolution.
Your name (optional):
Your email (optional):
Please write your suggestion here: