Select your preferred scripting language. All code snippets will be displayed in this language.
class in UnityEngine
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.Close
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.Close
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.
|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?|
|fullScreenMode||Set this property to one of the values in FullScreenMode to change the display mode of your application.|
|height||The current height of the screen window in pixels (Read Only).|
|orientation||Specifies logical orientation of the screen.|
|resolutions||All fullscreen resolutions supported by the monitor (Read Only).|
|safeArea||Returns the safe area of the screen in pixels (Read Only).|
|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).|
|SetResolution||Switches the screen resolution.|
Did you find this page useful? Please give it a rating: