You can lock your Unreal Engine framerate using console commands.
Locking the framerate in Unreal Engine is a common task for developers and users. It helps maintain consistent performance, reduce heat generation, or simulate lower-end hardware. The primary method involves using console commands, which can be accessed within the editor or at runtime in a packaged game.
Using Console Commands
The most direct way to lock your framerate is through the console command t.MaxFPS
. This command allows you to set a specific maximum frame rate limit.
How to use the t.MaxFPS
command:
-
In the Editor:
- On the top right corner of the main Editor window, there is a text box that says “Enter console command here”.
- Type “t.MaxFPS 30” to lock the Editor FPS to 30.
- You can replace
30
with any desired numerical value (e.g.,60
,120
,999
). Using0
will disable the limit and allow the engine to run as fast as possible.
-
In a Packaged Game:
- While running the game, you can open the console by pressing the backtick (`) or tilde (~) key.
- Type the command, for example,
t.MaxFPS 60
, and press Enter.
Examples of t.MaxFPS
Here are a few examples of the command:
t.MaxFPS 60
: Locks the framerate to 60 frames per second.t.MaxFPS 120
: Locks the framerate to 120 frames per second.t.MaxFPS 0
: Removes the framerate cap (runs uncapped).
This console command is a quick and effective way to control the engine's rendering speed. You can also set this command to execute automatically at startup through configuration files or Blueprints/C++ code for more permanent solutions.