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
Param | Type | Description |
---|---|---|
_orientation | ScreenOrientation | Screen orientation |
Screen Orientation
Id | Orientation | Description |
---|---|---|
0 | Portrait | Portrait orientation. |
1 | PortraitUpsideDown | Portrait orientation, upside down. |
2 | LandscapeLeft | Landscape orientation, counter-clockwise from the portrait orientation. |
3 | LandscapeRight | Landscape 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);
}