看Unity官网对Screen.SetResolution()解释和例子:
A resolution switch does not happen immediately; it will actually happen when the current frame is finished.
using UnityEngine;
public class ExampleScript : MonoBehaviour
{
void Start()
{
// Switch to 640 x 480 fu