Skip to main content

SetScreenOrientation

caution

The logical orientation affects not only screen orientation, but also touch coordinates. You should expect drastic changes in the touch positions after changing logical orientation, since touch positions are rotated clockwise or counter-clockwise to match screen coordinates.

Description​

Specifies logical orientation of the screen.

Parameters​

ParamTypeDescription
_orientationScreenOrientationScreen orientation
Screen Orientation
IdOrientationDescription
0PortraitPortrait orientation.
1PortraitUpsideDownPortrait orientation, upside down.
2LandscapeLeftLandscape orientation, counter-clockwise from the portrait orientation.
3LandscapeRightLandscape orientation, clockwise from the portrait orientation.

Method​

public void SetScreenOrientation(ScreenOrientation _orientation)

Example​

internal static API ARMODAPI = new API(nameof(APITest));
private void OnLoad(){
ChangeScreenOrientation();
}
private void ChangeScreenOrientation(){
ARMODAPI.SetScreenOrientation(ScreenOrientation.Portrait);
}