Method | Description | |
---|---|---|
Execute ( string command, bool silent = false ) : void |
Executes a string in the console
|
|
Register ( string name, ConsoleCommandDelegate func, string comment = "", CVarFlags flags = CVarFlags.None, bool overwrite = false ) : void |
Register a new console command.
|
|
Unregister ( string name ) : void |
Method | Description | |
---|---|---|
OnCommand ( string fullCommandLine ) : void |
public static Execute ( string command, bool silent = false ) : void | ||
command | string | console command e.g. "map testy" - no leading slash |
silent | bool | suppresses log in error case and logging the command to the console |
return | void |
public static Register ( string name, ConsoleCommandDelegate func, string comment = "", CVarFlags flags = CVarFlags.None, bool overwrite = false ) : void | ||
name | string | Command name. |
func | ConsoleCommandDelegate | Delegate to the console command function to be called when command is invoked. |
comment | string | Help string, will be displayed when typing in console "command ?". |
flags | CVarFlags | Bitfield consist of VF_ flags (e.g. VF_CHEAT) |
overwrite | bool | |
return | void |
public static Unregister ( string name ) : void | ||
name | string | |
return | void |