This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine.Console Class

Controls console-related parameters.

Onscreen Console Overlay#

By default the console overlay is disabled. To make it output console messages to the application screen it should be enabled. You can adjust the overlay’s behavior and appearance as well as specify the messages that will be printed exclusively to the onscreen overlay and will not be written to the console.

Onscreen Overlay with custom parameters and colored text

You can customize the console font by using the setFontSize(), setMessageColor(), setWarningColor(), and setErrorColor() methods. See the following example:

AppWorldLogic.cs (C#)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Unigine;

namespace UnigineApp
{
	class AppWorldLogic : WorldLogic
	{
		public override bool Init()
		{
			// enable the onscreen overlay
			Unigine.Console.Onscreen = true;
			// increase the size of the console's font 
			Unigine.Console.FontSize = 20;

			// change the color for different types of messages
			Unigine.Console.MessageColor = vec4.GREEN;
			Unigine.Console.WarningColor = vec4.RED;
			Unigine.Console.ErrorColor = vec4.BLUE;

			// send messages to the console
			Unigine.Log.Message("Message!\n");
			Unigine.Log.Warning("Warning!\n");
			Unigine.Log.Error("Error!\n");
			return true;
		}
	}
}

Adding Console Command with Several Arguments#

The Console class can be used to create custom user console commands with a different number of arguments. This section provides an example of how to create a custom console command with several arguments.

Prior Knowledge
It is supposed that you have already created an empty C# project by using UNIGINE SDK Browser.

In the example below, we perform the following actions:

  • Define and implement AppWorldLogic instance methods for console commands.
  • Get the console instance (which has a singleton implementation) and add a new command.
1. Adding Instance Methods

In this example, we define three methods in the AppWorldLogic.cs file: one as a callback for a console command and another two methods for actions depending on the number of arguments:

  • choose_command() selects the appropriate method.
  • action_no_args() is called if there are no console arguments.
  • action_one_arg() is called if an argument was passed.
Source code (C#)
// AppWorldLogic.cs

public static void choose_command(int argc, string[] argv)
{
	for (int i = 0; i < argc; i++) {
		Log.Message("arg[{0}]: {1}\n", i, argv[i]);
	}
	// note: the first element of argv is the name of console command
	if (argc == 1) {
		action_no_args();
	}
	else if (argc == 2) {
		 action_one_arg(argv[1]);
	}
	// for more arguments:
	//else if (...) {
	    //	// etc
	//}
}

// write the message into console, if there are no arguments
public static void action_no_args()
{
    Log.Message("first action! no arguments!\n");
}
// write the message into console, if an argument was passed
public static void action_one_arg(string s)
{
    Log.Message("second action! the argument is:{0} \n", s);
}

Arguments argc and argv are used to get the arguments count and arguments vector.

Notice
The first element of argv always keeps the name of a console command. Thus, argc is always >= 1. To get the first passed argument, you should use argv[1].
2. Adding Custom Console Command

Add a custom command to the AppWorldLogic.cs file by using addCommand() function. By adding this code into init() function of the AppWorldLogic class, the engine adds a new console command on AppWorldLogic class instance initialization.

Source code (C#)
// AppWorldLogic.cs

using Unigine;

/* ... */

public override bool Init()
{
	// add a command
    Console.AddCommand("console_action","Performs custom console action",choose_command);

	return 1;
}

/* ... */
3. Running Sample

After building the project, run it and open the console. Write recently created command to check the result:

Output
#if you write "console_action"
arg[0]: console_action
first action! no arguments!

#if you write "console_action arg"
arg[0]: console action
arg[1]: arg
second action! the argument is:arg

To remove the added console command, use removeCommand() method.

See Also#

  • C++ API sample located in the folder <UnigineSDK>/source/samples/Api/Systems/Console
  • C# API sample located in the folder <UnigineSDK>/source/csharp/samples/Api/Systems/Console
  • HowTo video on Printing User Messages to Console with C#

Console Class

Enums

LEVEL#

NameDescription
NORMAL = 0An ordinary message.
WARNING = 1A warning.
ERROR = 2An error message.

Properties

int Lock#

Checks if the console is disabled.
set
Disables or enables the console. By default the console is enabled.
set value - Positive integer to disable the console; otherwise, 0.

int NumCommands#

The number of all available console commands, including the custom ones.

int NumVariables#

The number of all available console variables.

bool Active#

A value indicating if the console is opened or closed.
set
Opens or closes the console. By default the console is closed.
set value - Positive integer to make the console active (opened); otherwise, 0.

string LastError#

Last error message printed to the console.

string LastWarning#

Last warning message printed to the console.

string LastMessage#

Last message printed to the console.

float OnscreenTime#

The time during which the text is displayed on the screen.
set
Sets the time during which the text is displayed on the screen.
set value - Time in seconds.

int OnscreenHeight#

The height for the onscreen overlay.
set
Sets the height value for the onscreen overlay.
set value - Height of the onscreen overlay in percentage of the window height.

int OnscreenFontSize#

The size of the onscreen overlay font.
set
Sets the size for the onscreen overlay font.
set value - Size for the onscreen overlay font.

bool Onscreen#

A value indicating if the onscreen overlay is shown or hidden.
set
Shows or hides the onscreen overlay.
set value - true to show the overlay; otherwise, false.

int FontSize#

The current font size used for console messages.
set
Returns the current font size used for console messages.
set value - New font size to be set for console messages

bool Wrapping#

A value indicating if the text wrapping is enabled for the console.
set
Enables the text wrapping to the next line.
set value - true to set the text wrapping; otherwise, false.

int Height#

The console height in percentage of the window height.
set
Sets the height of the console.
set value - Height of the console as percentage of the window height.

int Limit#

The maximum number of messages the console can output. the default value is 16384.
set
Sets the maximum number of messages the console can output.
set value - Maximum number of messages the console can output.

string Prompt#

The console prompt.
set
Updates the console prompt. The default prompt is Unigine~#.
set value - New console prompt.

vec4 TextColor#

The common font color for the console.
set
Sets a common font color for the console.
set value - Four-component vector specifying the color in the RGBA format.

vec4 ErrorColor#

The color for error messages in the console.
set
Sets a color for error messages in the console.
set value - Four-component vector specifying the color in the RGBA format.

vec4 WarningColor#

The color for warning messages in the console.
set
Sets a color for warning messages in the console.
set value - Four-component vector specifying the color in the RGBA format.

vec4 MessageColor#

The color for ordinary messages in the console.
set
Sets a color for ordinary messages in the console.
set value - Four-component vector specifying the color in the RGBA format.

vec4 BackgroundColor#

The background color for the console.
set
Sets a background color for the console.
set value - Four-component vector specifying the color in the RGBA format.

Members


bool IsCommand ( string name ) #

Returns a value indicating if a command with a given name exists.

Arguments

  • string name - The command name.

Return value

true if the command with a given name exists; otherwise, false.

string GetCommandDescription ( string name ) #

Returns the description of the console command by its name. If the name isn't specified, an empty string will be returned.

Arguments

  • string name - The command name.

Return value

The command description if it exists; otherwise, an empty string.

string GetCommandName ( int num ) #

Returns the name of the console command by its number in the array of the existing commands.

Arguments

  • int num - The command number.

Return value

The command name if it is found in the array of the existing commands; otherwise, an empty string.

void SetFloat ( string name, float value ) #

Sets a float value for a given variable.

Arguments

  • string name - The variable name.
  • float value - Float value of the variable.

float GetFloat ( string name ) #

Returns a float value of a given variable.

Arguments

  • string name - The variable name.

Return value

Float value of the variable.

float GetFloatMax ( string name ) #

Returns a maximum float value for a given variable.

Arguments

  • string name - Variable name.

Return value

Maximum float value of the variable.

float GetFloatMin ( string name ) #

Returns a minimum float value for a given variable.

Arguments

  • string name - Variable name.

Return value

Minimum float value of the variable.

bool IsFloat ( string name ) #

Checks if the value set for the given console variable is of the float type.

Arguments

  • string name - The variable name.

Return value

True if the variable value is float; otherwise, false.

void 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 GetInt ( string name ) #

Returns an integer value of a given variable.

Arguments

  • string name - Variable name.

Return value

Integer value of the variable.

int GetIntMax ( string name ) #

Returns a maximum integer value for a given variable.

Arguments

  • string name - Variable name.

Return value

Maximum integer value of the variable.

int GetIntMin ( string name ) #

Returns a minimum integer value for a given variable.

Arguments

  • string name - Variable name.

Return value

Minimum integer value of the variable.

bool IsInt ( string name ) #

Checks if the value of the given console variable is of the integer type.

Arguments

  • string name - The variable name.

Return value

True if the variable value is int; otherwise, false.

IntPtr addOutputCallback ( OutputDelegate func ) #

Adds a callback function that will be executed when a text is output to the console.The function is useful when you implement a custom console, for example. The callback function must receive 2 arguments:
  • string text - a text that is output to the console,
  • int level - one of the LEVEL_* variables that indicate the type of the output text. The value can be important for setting a color for console messages, for example.
Source code (C#)
// the callback function
private static void output_callback(string text, int level)
{
	switch (level)
	{
		case Unigine.Console.LEVEL_NORMAL:
			// logic for ordinary messages
			break;
		case Unigine.Console.LEVEL_WARNING:
			// logic for warnings
			break;
		case Unigine.Console.LEVEL_ERROR:
			// logic for error messages
			break;
	}
}

public override bool Init()
{
	// set the callback
	Console.AddOutputCallback(output_callback);
	
	return 1;
}

Arguments

  • OutputDelegate func - Callback function. The callback arguments must be: (string text, int level).

Return value

ID of the last added callback of the specified type, if the callback was added successfully; otherwise, nullptr. This ID can be used to remove this callback when necessary.

bool removeOutputCallback ( IntPtr id ) #

Removes the specified callback from the list of output callbacks.

Arguments

  • IntPtr id - Callback ID obtained when adding it.

Return value

True if the callback with the given ID was removed successfully; otherwise false.

void clearOutputCallbacks ( ) #

Clears all added output callbacks.

string GetPrompt ( ) #

Returns the console prompt.

Return value

The prompt text.

void SetString ( string name, string value ) #

Sets a string value for a given variable.

Arguments

  • string name - The variable name.
  • string value - String value of the variable.

string GetString ( string name ) #

Returns the string value of a given variable.

Arguments

  • string name - The variable name.

Return value

String value of the variable.

bool IsString ( string name ) #

Checks if the value of the given console variable is of the string type.

Arguments

  • string name - The variable name.

Return value

True if the variable value is string; otherwise, false.

bool IsVariable ( string name ) #

Returns a value indicating if a variable with a given name exists.

Arguments

  • string name - The variable name.

Return value

True if the variable exists; otherwise, false.

string GetVariableDescription ( string name ) #

Returns the description of the console variable by its name. If the name isn't specified, an empty string will be returned.

Arguments

  • string name - The variable name.

Return value

The variable description if it exists; otherwise, an empty string.

string GetVariableName ( int num ) #

Returns the name of the console variable by its number in the array of the existing variables.

Arguments

  • int num - The variable number.

Return value

The variable name if it is found in the array of the existing variables; otherwise, an empty string.

void SetVec2 ( string name, vec2 value ) #

Sets a two component vector for the console variable.

Arguments

  • string name - Name of the variable.
  • vec2 value - Value of the variable.

vec2 GetVec2 ( string name ) #

Returns the two component vector console variable.

Arguments

  • string name - Name of the variable.

Return value

Value of the variable.

bool IsVec2 ( string name ) #

Returns a value indicating if the console variable is a two component vector.

Arguments

  • string name - Name of the variable.

Return value

True if the variable is a two component vector; otherwise, false.

void SetVec3 ( string name, vec3 value ) #

Sets a three component vector for the console variable.

Arguments

  • string name - Name of the variable.
  • vec3 value - Value of the variable.

vec3 GetVec3 ( string name ) #

Returns the three component vector console variable.

Arguments

  • string name - Name of the variable.

Return value

Value of the variable.

bool IsVec3 ( string name ) #

Returns a value indicating if the console variable is a three component vector.

Arguments

  • string name - Name of the variable.

Return value

True if the variable is a three component vector; otherwise, false.

void SetVec4 ( string name, vec4 value ) #

Sets a four component vector for the console variable.

Arguments

  • string name - Name of the variable.
  • vec4 value - Value of the variable.

vec4 GetVec4 ( string name ) #

Returns the four component vector console variable.

Arguments

  • string name - Name of the variable.

Return value

Value of the variable.

bool IsVec4 ( string name ) #

Returns a value indicating if the console variable is a four component vector.

Arguments

  • string name

Return value

True if the variable is a three component vector; otherwise, false.

void addCommand ( string name, string desc, CommandCallback callback ) #

Adds a custom console command bound to a given callback function.

Arguments

  • string name - Name of the new console command.
  • string desc - Short description to be displayed in the console.
  • CommandCallback callback - The callback function to be run on command execution. The callback arguments must be (int argc, string[] argv,...).

Return value

1 if the custom command is added successfully; otherwise, 0.

void Flush ( ) #

Forces to execute all queued console commands.

bool RemoveCommand ( string name ) #

Removes a custom console command.

Arguments

  • string name - Name of the custom console command.

Return value

1 if the custom command has been removed successfully; otherwise, 0.

void Run ( string command ) #

Runs the specified console command.

Arguments

  • string command - A console command with arguments.

vec4 GetBackgroundColor ( ) #

Returns the background color for the console.

Return value

Four-component vector specifying the color in the RGBA format.

vec4 GetMessageColor ( ) #

Returns the color for ordinary messages in the console.

Return value

Four-component vector specifying the color in the RGBA format.

vec4 GetWarningColor ( ) #

Returns the color for warning messages in the console.

Return value

Four-component vector specifying the color in the RGBA format.

vec4 GetErrorColor ( ) #

Returns the color for error messages in the console.

Return value

Four-component vector specifying the color in the RGBA format.

vec4 GetTextColor ( ) #

Returns the common font color for the console.

Return value

Four-component vector specifying the color in the RGBA format.

void SetFontSize ( int size ) #

Returns the current font size used for console messages.

Arguments

  • int size - New font size to be set for console messages

int GetFontSize ( ) #

Returns the current font size used for console messages.

Return value

Current font size set for console messages

void SetHeight ( int height ) #

Sets the height of the console.

Arguments

  • int height - Height of the console as percentage of the window height.

int GetHeight ( ) #

Returns the console height in percentage of the window height.

void SetLimit ( int limit ) #

Sets the maximum number of messages the console can output.

Arguments

  • int limit - Maximum number of messages the console can output.

int GetLimit ( ) #

Returns the maximum number of messages the console can output. The default value is 16384.

void SetWrapping ( bool wrapping ) #

Enables the text wrapping to the next line.

Arguments

  • bool wrapping - true to set the text wrapping; otherwise, false.

bool Wrapping ( ) #

Returns a value indicating if the text wrapping is enabled for the console.

void SetOnscreen ( bool onscreen ) #

Shows or hides the onscreen overlay.

Arguments

  • bool onscreen - true to show the overlay; otherwise, false.

bool Onscreen ( ) #

Returns a value indicating if the onscreen overlay is shown or hidden.

Return value

True if the overlay is shown; otherwise, false.

void SetOnscreenFontSize ( int scale ) #

Sets the size for the onscreen overlay font.

Arguments

  • int scale - Size for the onscreen overlay font.

int GetOnscreenFontSize ( ) #

Returns the size of the onscreen overlay font.

Return value

The size of the console font.

void SetOnscreenHeight ( int height ) #

Sets the height value for the onscreen overlay.

Arguments

  • int height - Height of the onscreen overlay in percentage of the window height.

int GetOnscreenHeight ( ) #

Returns the height for the onscreen overlay.

Return value

The height of the onscreen overlay in percentage of the window height.

void SetOnscreenTime ( float time ) #

Sets the time during which the text is displayed on the screen.

Arguments

  • float time - Time in seconds.

float GetOnscreenTime ( ) #

Returns the time during which the text is displayed on the screen.

Return value

The time in seconds.

void Write ( string text ) #

Writes the specified text to the console and displays it on the screen (onscreen overlay).
Notice
The onscreen overlay must be enabled for the text to be seen.

Arguments

  • string text - Text to output to the console.

void Write ( vec4 color, string text ) #

Writes the specified text to the console and displays it on the screen (onscreen overlay).
Notice
The onscreen overlay must be enabled for the text to be seen.

Arguments

  • vec4 color - Four-component vector specifying the text color in the RGBA format.
  • string text - Text to output to the console.

void Write ( Console.LEVEL level, string text ) #

Writes the specified text to the console and displays it on the screen (onscreen overlay).
Notice
The onscreen overlay must be enabled for the text to be seen.

Arguments

  • Console.LEVEL level - Type of the message.
  • string text - Text to output to the console.

static void GetMessages ( ICollection<string> messages, int limit ) #

Gets the messages written to the console and the onscreen overlay.

Arguments

  • ICollection<string> messages - Vector to populate with messages.
  • int limit - Maximum number of messages to retrieve.

void GetMessages ( string[] messages, int[] levels, int limit ) #

Arguments

  • string[] messages - Vector to populate with messages.
  • int[] levels - Types of messages to retrieve.
  • int limit - Maximum number of messages to retrieve.

static void GetWarnings ( ICollection<string> messages, int limit ) #

Gets the warning messages written to the console and the onscreen overlay.

Arguments

  • ICollection<string> messages - Vector to populate with messages.
  • int limit - Maximum number of messages to retrieve.

static void GetErrors ( ICollection<string> messages, int limit ) #

Gets the error messages written to the console and the onscreen overlay.

Arguments

  • ICollection<string> messages - Vector to populate with messages.
  • int limit - Maximum number of messages to retrieve.

string GetLastMessage ( ) #

Returns the last message printed to the console.

Return value

Last message printed to the console.

string GetLastWarning ( ) #

Returns the last warning message printed to the console.

Return value

Last warning message printed to the console.

string GetLastError ( ) #

Returns the last error message printed to the console.

Return value

Last error message printed to the console.

static void WriteLine ( string text ) #

Writes the text followed by the line terminator to the console and the onscreen overlay.
Notice
The onscreen overlay must be enabled for the text to be seen.

Arguments

  • string text - Text to output to the console.

static void WriteLine ( vec4 color, string text ) #

Writes the text followed by the line terminator to the console and the onscreen overlay.
Notice
The onscreen overlay must be enabled for the text to be seen.

Arguments

  • vec4 color - Four-component vector specifying the text color in the RGBA format.
  • string text - Text to output to the console.

static void WriteLine ( Console.LEVEL level, string text ) #

Writes the text followed by the line terminator to the console and the onscreen overlay.
Notice
The onscreen overlay must be enabled for the text to be seen.

Arguments

  • Console.LEVEL level - Type of the message.
  • string text - Text to output to the console.

static void OnscreenWrite ( string text ) #

Writes the text to the onscreen overlay only.
Notice
The onscreen overlay must be enabled for the text to be seen.

Arguments

  • string text - Text to output to the console.

static void OnscreenWrite ( vec4 color, string text ) #

Writes the text to the onscreen overlay only.
Notice
The onscreen overlay must be enabled for the text to be seen.

Arguments

  • vec4 color - Four-component vector specifying the text color in the RGBA format.
  • string text - Text to output to the console.

static void OnscreenWrite ( Console.LEVEL level, string text ) #

Writes the text to the onscreen overlay only.
Notice
The onscreen overlay must be enabled for the text to be seen.

Arguments

  • Console.LEVEL level - Type of the message.
  • string text - Text to output to the console.

static void OnscreenWriteLine ( string text ) #

Writes the text only to the onscreen overlay followed by the line terminator.
Notice
The console overlay must be enabled for the text to be seen on the screen.

Arguments

  • string text - Text to output to the console.

static void OnscreenWriteLine ( vec4 color, string text ) #

Writes the text only to the onscreen overlay followed by the line terminator.
Notice
The console overlay must be enabled for the text to be seen on the screen.

Arguments

  • vec4 color - Four-component vector specifying the text color in the RGBA format.
  • string text - Text to output to the console.

static void OnscreenWriteLine ( Console.LEVEL level, string text ) #

Writes the text only to the onscreen overlay followed by the line terminator.
Notice
The console overlay must be enabled for the text to be seen on the screen.

Arguments

  • Console.LEVEL level - Type of the message.
  • string text - Text to output to the console.

static void Message ( vec4 color, string format, ... ) #

Writes the ordinary message to the console and the onscreen overlay.
Notice
The onscreen overlay must be enabled for the text to be seen.

Arguments

  • vec4 color - Four-component vector specifying the text color in the RGBA format.
  • string format - Formatted text.
  • ... - Arguments, multiple allowed.

static void Message ( string format, ... ) #

Writes the ordinary message to the console and the onscreen overlay.
Notice
The onscreen overlay must be enabled for the text to be seen.

Arguments

  • string format - Formatted text.
  • ... - Arguments, multiple allowed.

static void Warning ( string format, ... ) #

Writes the warning message to the console and the onscreen overlay.
Notice
The onscreen overlay must be enabled for the text to be seen.

Arguments

  • string format - Formatted text.
  • ... - Arguments, multiple allowed.

static void Error ( string format, ... ) #

Writes the error message to the console and the onscreen overlay.
Notice
The onscreen overlay must be enabled for the text to be seen.

Arguments

  • string format - Formatted text.
  • ... - Arguments, multiple allowed.

static void MessageLine ( vec4 color, string format, ... ) #

Writes the ordinary message to the console and the onscreen overlay followed by the line terminator.
Notice
The onscreen overlay must be enabled for the text to be seen.

Arguments

  • vec4 color - Four-component vector specifying the text color in the RGBA format.
  • string format - Formatted text.
  • ... - Arguments, multiple allowed.

static void MessageLine ( string format, ... ) #

Writes the ordinary message to the console and the onscreen overlay followed by the line terminator.
Notice
The onscreen overlay must be enabled for the text to be seen.

Arguments

  • string format - Formatted text.
  • ... - Arguments, multiple allowed.

static void WarningLine ( string format, ... ) #

Writes the warning message to the console and the onscreen overlay followed by the line terminator.
Notice
The onscreen overlay must be enabled for the text to be seen.

Arguments

  • string format - Formatted text.
  • ... - Arguments, multiple allowed.

static void ErrorLine ( string format, ... ) #

Writes the error message to the console and the onscreen overlay followed by the line terminator.
Notice
The onscreen overlay must be enabled for the text to be seen.

Arguments

  • string format - Formatted text.
  • ... - Arguments, multiple allowed.

static void OnscreenMessage ( vec4 color, string format, ... ) #

Writes the ordinary message to the onscreen overlay only.
Notice
The console overlay must be enabled for the text to be seen on the screen.

Arguments

  • vec4 color - Four-component vector specifying the text color in the RGBA format.
  • string format - Formatted text.
  • ... - Arguments, multiple allowed.

static void OnscreenMessage ( string format, ... ) #

Writes the ordinary message to the onscreen overlay only.
Notice
The console overlay must be enabled for the text to be seen on the screen.

Arguments

  • string format - Formatted text.
  • ... - Arguments, multiple allowed.

static void OnscreenWarning ( string format, ... ) #

Writes the warning message to the onscreen overlay only.
Notice
The console overlay must be enabled for the text to be seen on the screen.

Arguments

  • string format - Formatted text.
  • ... - Arguments, multiple allowed.

static void OnscreenError ( string format, ... ) #

Writes the error message to the onscreen overlay only.
Notice
The console overlay must be enabled for the text to be seen on the screen.

Arguments

  • string format - Formatted text.
  • ... - Arguments, multiple allowed.

static void OnscreenMessageLine ( vec4 color, string format, ... ) #

Writes the ordinary message only to the onscreen overlay followed by the line terminator.
Notice
The console overlay must be enabled for the text to be seen on the screen.

Arguments

  • vec4 color - Four-component vector specifying the text color in the RGBA format.
  • string format - Formatted text.
  • ... - Arguments, multiple allowed.

static void OnscreenMessageLine ( string format, ... ) #

Writes the ordinary message only to the onscreen overlay followed by the line terminator.
Notice
The console overlay must be enabled for the text to be seen on the screen.

Arguments

  • string format - Formatted text.
  • ... - Arguments, multiple allowed.

static void OnscreenWarningLine ( string format, ... ) #

Writes the warning message only to the onscreen overlay followed by the line terminator.
Notice
The console overlay must be enabled for the text to be seen on the screen.

Arguments

  • string format - Formatted text.
  • ... - Arguments, multiple allowed.

static void OnscreenErrorLine ( string format, ... ) #

Writes the error message only to the onscreen overlay followed by the line terminator.
Notice
The console overlay must be enabled for the text to be seen on the screen.

Arguments

  • string format - Formatted text.
  • ... - Arguments, multiple allowed.
Last update: 2021-11-30
Build: ()