RConsole

Check if the console is open or closed.

Field
Example
Field
bool isConsoleOpen;
Example
bool consoleStatus = RConsole.isConsoleOpen;
// The value will be true when the console is open and false when closed.

Get the last command arguments in an array.

Field
Example
Field
string[] lcargs;
Example
string[] args = RConsole.lcargs.Skip(1).ToArray();
// If value.length == 0 it means that the user didn't specified any argument.
// For example if the user type "urcommand 29" the first array value will be 29.
string firstArgument = args[0];
RConsole.Log("The user has entered the argument : "+firstArgument);
// This will return "The user has entered the argument : 29"

Logging in the console

Methods
Examples
Methods
void Log(string log)
void Log(string log, LogType LogType)
void LogAssert(string log)
void LogError(string log)
void LogException(string log)
void LogWarning(string log)
Examples
RConsole.Log("my message");

Register a console command.

Method
Example
Method
void registerCommand(Type modType, string desc, string command, Action action)
Example
RConsole.registerCommand(typeof(ModClass), "Kill yourself.", "kill", kill);
void kill()
{
// put your code here.
}