Version: 5.4 beta (switch to 5.3)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

QualitySettings.maxQueuedFrames

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual
public static var maxQueuedFrames: int;
public static int maxQueuedFrames;

Description

Maximum number of frames queued up by graphics driver.

Graphics drivers can queue up frames to be rendered. When CPU has much less work to do than the graphics card, is it possible for this queue to become quite large. In those cases, user's input will "lag behind" what is on the screen.

Use QualitySettings.maxQueuedFrames to limit maximum number of frames that are queued. The default value is 2, which strikes the best balance between frame latency and framerate.

Note that you can reduce input latency by using maxQueuedFrames with a value of 1 because the CPU will be waiting until the graphics card finishes rendering previous frames. The downside of this however, is that it can result in a lower framerate.

Currently maxQueuedFrames is only implemented in Direct3D 9 and 11 graphics APIs; it will be ignored on any other graphics API.