Version: 2021.1

Screen.SetResolution

切换到手册
public static void SetResolution (int width, int height, FullScreenMode fullscreenMode, int preferredRefreshRate= 0);
public static void SetResolution (int width, int height, FullScreenMode fullscreenMode);
public static void SetResolution (int width, int height, bool fullscreen, int preferredRefreshRate= 0);
public static void SetResolution (int width, int height, bool fullscreen);

描述

This has the same functionality as Screen.SetResolution and also mimics platform-specific behavior in the Unity Editor.