engine.console Functions
Controls console-related parameters.
Console Class
Members
void engine.console.setActivity(int activity)
Open or close the console. By default the console is closed.Arguments
- int activity - Positive integer to make the console active (opened); otherwise, 0.
int engine.console.getActivity()
Returns a state of the console.Return value
1 if the console is active (opened); otherwise, 0.void engine.console.setBackgroundColor(vec4 color)
Sets a background color for the console.Arguments
- vec4 color - Four-component vector specifying the color in the RGBA format.
int engine.console.isCommand(string name)
Returns a value indicating if a command with a given name exists.Arguments
- string name - Command name.
Return value
1 if the command exists; otherwise, 0.void engine.console.setErrorColor(vec4 color)
Sets a color for error messages in the console.Arguments
- vec4 color - Four-component vector specifying the color in the RGBA format.
void engine.console.setFloat(string name, float value)
Sets a float value for a given variable.Arguments
- string name - Variable name.
- float value - Value of the variable.
float engine.console.getFloat(string name)
Returns a float value of a given variable.Arguments
- string name - Variable name.
Return value
Value of the variable.void engine.console.setInt(string name, int value)
Sets an integer value for a given variable.Arguments
- string name - Variable name.
- int value - Value of the variable.
int engine.console.getInt(string name)
Returns an integer value of a given variable.Arguments
- string name - Variable name.
Return value
Value of the variable.void engine.console.setLock(int lock)
Disables or enables the console. By default the console is enabled.Arguments
- int lock - Positive integer to disable the console; otherwise, 0.
int engine.console.getLock()
Checks if the console is disabled.Return value
1 if the console is disabled; otherwise, 0.void engine.console.setMessageColor(vec4 color)
Sets a color for ordinary messages in the console.Arguments
- vec4 color - Four-component vector specifying the color in the RGBA format.
void engine.console.setPrompt(string str)
Updates the console prompt. The default prompt is Unigine~#.Arguments
- string str - New console prompt.
void engine.console.setString(string name, string value)
Sets a string value for a given variable.Arguments
- string name - Variable name.
- string value - Value of the variable.
string engine.console.getString(string name)
Returns a string value of a given variable.Arguments
- string name - Variable name.
Return value
Value of the variable.void engine.console.setTextColor(vec4 color)
Sets a common font color for the console.Arguments
- vec4 color - Four-component vector specifying the color in the RGBA format.
int engine.console.isVariable(string name)
Returns a value indicating if a variable with a given name exists.Arguments
- string name - Variable name.
Return value
1 if the variable exists; otherwise, 0.void engine.console.setWarningColor(vec4 color)
Sets a color for warning messages in the console.Arguments
- vec4 color - Four-component vector specifying the color in the RGBA format.
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)