Unity 3D

来源:互联网 发布:执行仪表板软件 编辑:程序博客网 时间:2024/06/17 05:26

   设置手机屏幕的正方向,



    void Awake()

    {

      //设置在home键的正右方  

      Screen.orientation = ScreenOrientation.LandscapeRight;

    }




    void Start () {

        //设置屏幕的自动摆放

        Screen.autorotateToLandscapeLeft = true;
        Screen.autorotateToLandscapeRight = true;
        Screen.autorotateToPortrait = false;
        Screen.autorotateToPortraitUpsideDown = false;
}

0 0
原创粉丝点击