Dynamically set screen resolution when UE is running

1. Achieve goals

Start the game as an independent process (Standalone Game) in UE, and 运行时动态修改change the screen resolution of the game window from 1000x800 to 600x400 as shown in the figure below.

insert image description here

2. Implementation process

Refer to documents and materials r.SetResto realize dynamic control of window resolution by inputting console commands.

That is, r.SetRes width x height, where "x" is a lowercase letter X, not a multiplication sign.

You can enter commands directly on the console command line or use blueprints to enter and execute them indirectly.

2.1 Enter commands directly on the console

(1) Enter "~" to 运行时bring up the console
(2) Enter the command r.SetRes 600x400
insert image description here

Guess you like

Origin blog.csdn.net/weixin_45782925/article/details/128179130