C#给Android手机强制横屏

private void Awake()
{

    //强制横屏
    Screen.orientation = ScreenOrientation.AutoRotation;
    Screen.autorotateToPortrait = false;
    Screen.autorotateToPortraitUpsideDown = false;
    Screen.autorotateToLandscapeLeft = true;
    Screen.autorotateToLandscapeRight = true;
}

猜你喜欢

转载自blog.csdn.net/qq_39646949/article/details/100928540