o3de / o3de.org

The O3DE website
Other
85 stars 159 forks source link

[ISSUE][DOCS] Add info on using get_cvar and set_cvar in Lua and Python #1648

Open willihay opened 2 years ago

willihay commented 2 years ago

Describe the issue

We don't have any documentation on how to get and set CVARs in Lua or Python automation scripts.

Lua

The following functions are available to all Lua scripts in O3DE: get_cvar() set_cvar(, value) set_cvar_integer(, value) set_cvar_float(, value) set_cvar_string(, value)

Python automation

The cvar functions listed above are available to Python automation scripts as follows: azlmbr.legacy.general.get_cvar()

Impacted page(s)

At a minimum, it seems like a good place to add this info is under Working with CVARs.

Optionally, a new topic could also be created under Scripting - Lua, such as "Using CVARs in Lua", similar to Using EBuses in Lua.

For Python scripts in Editor, they could be documented somewhere under Editor.

Expected experience

Use of CVARs in scripting languages is documented.

sptramer commented 2 years ago

This is probably urgent and small-scope enough to do before we have a Lua reference RFC; Issue would be resolved in part by refgen, but also needs to be included in general CVar docs.