打包分辨率及横屏设置/帧率显示及优化

设置屏幕分辨率类型

法1

打开BuildSetting->PlayerSetting->Resolution and Presentation->取消勾选Default is full sceen选项并设置你自己设置的分辨率,

选择Display ResolutionDialog为disable->在程序Awake中记得使用Screen.SetResolution(1024,768, false).

法2

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
 
public class SetResolution : MonoBehaviour
{
        void Awake()
        {
                Screen.SetResolution(1920,1080, true);
        }
}

屏幕分辨率设置时使用全屏幕

猜你喜欢

转载自blog.csdn.net/qq_34216631/article/details/129548859
今日推荐