CommandList::Process Method
Processes the command list. See Common snippets for common use cases.
Syntax
void CommandList::Process(
CommandListProcessOption option = CommandListProcessOption :: QueueAndExecute
)
Parameters
CommandListProcessOption option = CommandListProcessOption :: QueueAndExecute
The option to use when processing the command list:
OnlyParse
: only parse the command list, do not execute it.QueueAndExecute
: queue the command list and execute it in next frames.ExecuteImmediately
: execute the command list immediately.
Return value
None.
Remarks
Processing involves parsing the commands inside the list and queuing them for execution. The queue is processed every frame, usually 1000 commands per frame. If you need synchronous execution, use ExecuteImmediately
option.
TMInterface divides commands into 3 categories:
- non-timed commands: these commands will get executed in next frames without any synchronization.
- timed commands: “executing” a timed command does not have any effect, instead the command is put into the TimedCommands array property. An example of such command can be
0 set speed 5
. When the list is set as the current one with SetCurrentCommandList, the timed commands are then executed in-sync with the game timer. - input timed commands: same as timed commands but they get their own separate array property InputCommands. This allows for easy processing of input commands within the list.