PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

ScreenOrientation

ScreenOrientation

Indicates what orientation the game prefers to be played on mobile devices.


Enums

Name Value Description

LandscapeLeft

0

A preference where the game is displayed landscape (horizontally) with the bottom of the device on the left side of the screen.

LandscapeRight

1

A preference where the game is displayed landscape (horizontally) with the bottom of the device on the right side of the screen.

LandscapeSensor

2

A preference where the game is displayed landscape (horizontally) with the bottom of the device on the left of right side of the screen depending on the device’s orientation (the sensor determines which side allows for the game to be displayed right-side-up).

Portrait

3

A preference where the game is displayed portrait (vertically) with the bottom of the device on the bottom of the screen.

Sensor

4

A preference where the game is displayed depending on the best match to the device’s current orientation - either landscape (left/right) or portrait.

Referenced by:

  • StarterGui/ScreenOrientation
  • PlayerGui/ScreenOrientation
  • PlayerGui/CurrentScreenOrientation
  • StudioDeviceEmulatorService/SetCurrentOrientation
  • StudioDeviceEmulatorService/GetCurrentOrientation