Console commands

This page lists all console commands that you can send to an instance of the engine from the command line in the Status bar of the interactive editor.

For details on how to send commands, see Send commands from the Status bar.

List of all commands

apex

Controls runtime debugging for the APEX cloth physics system. This command is only available if the APEX system is enabled in your version of the Stingray engine.

Requires one of the following parameters.

The <PARAMETER> setting accepts the following values: normals, tangents, bitangents, lod-benefits, bone-frames, collision-volumes, collision-volumes-wire, mesh, skeleton, skinned-positions, velocities, and wind.

crash

Causes a crash, in order to test the game's crash handling systems.

Requires one of the following parameters.

file_system

Simulates running the game on slower file systems.

Accepts only one parameter:

game

Controls the game.

Requires one of the following parameters.

graph

Draws graphs in the game viewport that show the changes in profiled data over time.

Requires one of the parameters described in the following sections.

Note that any <FIELD> name setting you provide must match a value tracked by the statistics system. This may be any of the values the engine tracks by default, such as application.fps or lua.gc.total. This may also be a value that you have requested to be tracked by calling the stingray.Profiler.record_statistics() function in your Lua code.

Visibility

Screen layout and position

Customizing graphs and data

Customizing how graph data are displayed

help

Prints to the log a list of all available console commands, with a brief description of each.

To retrieve details about the parameters accepted by any command, append the name of that command as an argument to help. For example:

> help profiler

lua

Controls logging of Lua memory allocations.

Accepts only one parameter:

memory_resources

Prints the memory used by resources to the console log. For each type of resource, you receive the total memory allocated for all resources of that type, and the name of the largest resource of that type.

Requires one of the following parameters.

memory_tree

Prints the current memory usage of the engine to the log, arranged in a hierarchical tree structure.

Memory tree output

network

Controls the operation of the networking system, and allows you to simulate poor connections to specified peers in the network.

Requires one of the parameters described in the following sections.

Connection strength

For these parameters, the [#peer] setting is optional. If you omit it, the operation will be applied to the default peer. If you specify the peer, you must provide its ID, prefixed by the # character.

Probability values must be expressed as a value between 0.0 and 1.0.

Logging levels

particles

Controls runtime debugging for the particle system.

For all parameters, the <ON/OFF> setting accepts the values on or off. Any other value toggles the current status.

Debugging in-game

perfhud

Draws performance statistics in the game viewport.

Requires one of the parameters described in the following sections.

Subsystems

Networking statistics

physics

Controls runtime debugging for the physics system.

Requires one of the parameters described in the following sections.

For all parameters, the <ON/OFF> setting accepts the values on or off. Any other value toggles the current status.

Debugging in-game

The <PARAMETER> settings for show and hide accept the following values: world_axes, body_axes, body_mass_axes, body_lin_velocity, body_ang_velocity, body_joint_groups, contact_point, contact_normal, contact_error, contact_force, actor_axes, collision_aabbs, collision_shapes, collision_axes, collision_compounds, collision_fnormals, collision_edges, collision_static, collision_dynamic, collision_pairs, joint_local_frames, joint_limits, particle_system_position, particle_system_velocity, particle_system_collision_normal, particle_system_bounds, particle_system_grid, particle_system_broadphase_bounds, particle_system_max_motion_distance, cull_box

Debugging in the Log Console

Debugging in the PhysX Visual Debugger

profiler

Controls the built-in performance profiling system.

Requires one of the following parameters:

pump

Advances the game by a single frame when running in pumped mode.

reboot

Restarts the game application.

Accepts any number of the following parameters. All parameters are optional, and you can specify multiple parameters in the same command line.

refresh

Forces a reload of all resources that have changed since the last time they were loaded in the game.

renderer

Controls the renderer.

Requires one of the following parameters.

statistics

Prints a record of current statistics to the Log Console. For example:

application.fps = 32.638138
application.smoothed_fps = 49.530058
lua.gc.total = 1008.000000
lua.frame_alloc_count = 0.000000
memory.default_allocator.size = 53.452225
lua.gc.estimate = 1003.000000
application.smoothed_delta_time = 20.189760
lua.frame_alloc_bytes = 0.000000
memory.page_allocator.size = 56.937500
application.delta_time = 30.639002
lua.gc.percentage = 0.007976
lua.gc.collection_ms = 0.500000

streamer_stats

Prints a record of each resource managed by the texture streaming system. See Texture streaming.

Each record includes the following information:

vector_field

Controls runtime debugging for vector fields.

Requires one of the following parameters.

Related topics