This documentation is for a prerelease version of O3DE. Click here to switch to the latest release, or select a version from the dropdown.

Version:

Console variables (CVARs)

Console variables (CVARs) can be used to set various editor and runtime options in O3DE. O3DE ships with many built-in CVARs but also supports options for configuring and grouping your own.

Working with CVARs

You can define your own CVARs in code using the CVAR macro functions. You can also group CVARs together in console variable groups, which allow you to change multiple CVARs at once.

You can invoke CVARs in the Editor via the console.

You can also pass CVARs on the command line when launching O3DE binaries via --{cvar name} {value} or --{cvar name}={value}. For example, ServerLauncher.exe --sv_somebool=true.

Additionally, you can add CVARs to configuration files.

Discovering CVARs

The fastest way to find all the CVARs settable in the current project is via the console variables window. Bringing up the console window will list all the CVARs in the current project as well as allow you to set their values.

You can also begin to type the start of a CVAR name in the console and then use the Tab key to show autocomplete and look at all the potential matches. For example, after typing ed_ you can use Tab to cycle through all the CVARs that impact the editor.

Automatic CVAR expansion in the console

CVAR console functions

There are built-in console commands that make working with CVARs easier:

NameDescription
DumpCommandsVars(Legacy) Will dump all the CVARs and their values to a file called consolecommandsandvars.txt.
Prefer to use the console window to see CVARs and values.
resetcvarsResets all CVARs to their initial values.

Common CVAR prefixes

O3DE uses the following prefixes to make discovering CVARs easier:

PrefixUsage
bg_Both Games, for common CVARs that can be used on both client and server.
cl_For client only CVARs.
ed_For editor only CVARs.
net_For low-level networking CVARs.
physx_For NVIDIA PhysX related CVARs.
r_For rendering related CVARs.
s_For sound related CVARs.
sv_For server only CVARs.
sys_For low-level core systems CVARs.

Examples of CVARs in O3DE

Many O3DE features expose CVARs to aid debugging, troubleshooting and additional visualization. These features include: