Play Session
Play Session: Spawn, change and check actors while your game runs in Play In Editor. Unreal Engine 5 command reference with parameters and examples.
Play Session: Spawn, change and check actors while your game runs in Play In Editor. Unreal Engine 5 command reference with parameters and examples.
19 commands. Each shows its parameters and an example, and has a copyable deep link, so you (or an AI agent) can jump straight to one.
spawn_runtime_actorsSpawn 1 to 1000 actors or Blueprints into a running play session, near a player or at a location
| Parameter | Type | Required | Description |
|---|---|---|---|
| class | string | Yes | Actor class: a Blueprint path (/Game/AI/BP_Enemy), a bare Blueprint name, a class path, or a native class name |
| count | int | No | How many, 1 to 1000 |
| world | string | No | |
| location | json | No | Center of the group as [x,y,z] or "x,y,z"; omit to spawn in front of a player |
| rotation | json | No | Rotation of every actor as [pitch,yaw,roll]; omit to face the player (or zero with --location) |
| player | int | No | Without --location: the player controller index to spawn near |
| distance | float | No | Without --location: how far in front of the player the group's center is |
| pattern | string | No | grid, ring, random or point (default point for one actor, grid for more) |
| spacing | float | No | Space between actors in a grid or ring |
| radius | float | No | Radius of a random pattern, and the smallest ring radius |
| on_navmesh | bool | No | Put every point on the navigation mesh |
| snap_to_ground | bool | No | Stand each actor on static ground |
| properties | json | No | Property path to value, set before the construction script and BeginPlay, e.g. {"Health":50,"CharacterMovement.MaxWalkSpeed":300} |
| replicate | bool | No | Server only: turn actor replication on (or off with =false) for these actors, whatever the class says |
| replicate_movement | bool | No | Server only: turn movement replication on or off for these actors |
| ai | bool | No | Pawns on the server get an AI controller by default; =false leaves them without one |
| ai_controller | string | No | AI controller class instead of the pawn's AIControllerClass |
| behavior_tree | string | No | Behavior Tree asset each AI controller runs |
| tags | stringlist | No | Extra actor tags |
| batch | string | No | Name for this group, used by the other runtime commands (default <Class>_<n>); an existing name adds to that batch |
| collision | string | No | When a spot is blocked: adjust (default; move it free), always (spawn in place) or skip_if_blocked |
cfa spawn_runtime_actors --class /Game/AI/BP_Enemy --count 100 --on-navmesh --behavior-tree /Game/AI/BT_Enemy
cfa spawn_runtime_actors --class BP_Pickup --count 12 --pattern ring --radius 600 --replicate
cfa spawn_runtime_actors --class /Game/BP_Crate --location "[0,0,200]" --properties '{"Health":50}'
cfa spawn_runtime_actors --class BP_Marker --world client1list_runtime_actorsCount and list play-session actors per world, server and each client
| Parameter | Type | Required | Description |
|---|---|---|---|
| world | string | No | server, client1..., all_clients, instance:N or all (default) |
| batch | string | No | Only this batch |
| class | string | No | Only classes whose name contains this text |
| filter | string | No | Only actor names that contain this text |
| tag | string | No | Only actors with this tag |
| spawned_only | bool | No | Only actors the runtime commands spawned; false lists every actor |
| properties | string | No | Property paths to read on every listed actor, separated by commas, e.g. Health,CharacterMovement.MaxWalkSpeed (plugin 2.23.0) |
| max_results | int | No | Most rows over all worlds; counts stay complete |
cfa list_runtime_actors --batch enemies
cfa list_runtime_actors --world client1 --batch enemies --max-results 5
cfa list_runtime_actors --world server --spawned-only=false --class Characterget_runtime_actorOne play-session actor: role, replication, transform, AI, client copies, variables
| Parameter | Type | Required | Description |
|---|---|---|---|
| actor | string | Yes | Actor name or label in that world, from list_runtime_actors, or a keyword: game_mode, game_state, world_settings, player_controller:N, pawn:N, player_state:N, hud:N, camera:N |
| world | string | No | |
| component | string | No | Read a component of the actor instead, by name |
| property_path | string | No | Return only this property's value |
| filter | string | No | Properties whose name contains this text, from every class of the actor |
| max_results | int | No | Most properties listed |
cfa get_runtime_actor --actor BP_Enemy_C_3
cfa get_runtime_actor --actor BP_Enemy_C_3 --world client1 --property-path Health
cfa get_runtime_actor --actor BP_Enemy_C_3 --component CharacterMovement --filter Speedset_runtime_actor_propertiesChange properties of running actors; replicated ones reach every client
| Parameter | Type | Required | Description |
|---|---|---|---|
| properties | json | Yes | Property path to value, e.g. {"Health":25,"Stats.Armor":3} |
| actor | string | No | One actor by name; give actor or batch |
| batch | string | No | Every actor of a batch in that world |
| world | string | No | |
| component | string | No | Write to a component of each actor instead, by name |
cfa set_runtime_actor_properties --batch enemies --properties '{"Health":25}'
cfa set_runtime_actor_properties --actor BP_Door_C_0 --properties '{"bIsOpen":true}'
cfa set_runtime_actor_properties --batch enemies --component CharacterMovement --properties '{"MaxWalkSpeed":150}'call_runtime_functionCall a function, event or RPC on running actors with named arguments
| Parameter | Type | Required | Description |
|---|---|---|---|
| function | string | Yes | Function, event or RPC name |
| args | json | No | Argument name to value, e.g. {"Amount":5} |
| actor | string | No | One actor by name; give actor or batch |
| batch | string | No | Every actor of a batch in that world |
| world | string | No | |
| component | string | No | Call it on a component of each actor instead, by name |
cfa call_runtime_function --actor BP_Enemy_C_3 --function TakeHit --args '{"Damage":10}'
cfa call_runtime_function --batch enemies --function K2_SetActorLocation --args '{"NewLocation":[0,0,300]}'
cfa call_runtime_function --actor BP_Door_C_0 --function MulticastOpendestroy_runtime_actorsDestroy an actor, a batch, or every spawned actor of a play world
| Parameter | Type | Required | Description |
|---|---|---|---|
| actor | string | No | One actor by name |
| batch | string | No | Every actor of a batch |
| all_spawned | bool | No | Every actor the runtime commands spawned in that world |
| world | string | No |
cfa destroy_runtime_actors --batch enemies
cfa destroy_runtime_actors --actor BP_Enemy_C_3
cfa destroy_runtime_actors --all-spawnedvalidate_runtime_actorsCheck a batch with a verdict: alive, AI running, a matching copy on every client
| Parameter | Type | Required | Description |
|---|---|---|---|
| actor | string | No | One actor by name; give actor or batch |
| batch | string | No | Every actor of a batch |
| world | string | No |
cfa validate_runtime_actors --batch enemies
cfa validate_runtime_actors --actor BP_Door_C_0simulate_inputPress keys for the local player in timed steps (W 2 s, then W+A, LeftShift+W...) and report how the pawn moved
| Parameter | Type | Required | Description |
|---|---|---|---|
| steps | json | Yes | JSON array of steps, each {"keys":[...],"seconds":N}: key names as Unreal spells them (W, A, S, D, SpaceBar, LeftShift, LeftControl, E, LeftMouseButton), keys in one step are held together, an axis key takes a value ({"key":"MouseX","value":4} per frame, {"key":"Gamepad_LeftY","value":1} held), an empty keys array waits. A step can also hold Input Actions directly (fires with no key bound): "actions":["/Game/Input/IA_Jump",{"action":"/Game/Input/IA_Move","value":[0,1]}], value as the action's type takes it. Up to 64 steps, 60 s each, 120 s in all |
| world | string | No | Play world whose local player presses the keys: server, client1... (default: the first world with a local player) |
| wait | bool | No | Wait until it finishes and return the result (false = return at once; repeat the same call to collect it) |
| wait_timeout | int | No | Seconds to wait before returning a still-running job (default 100; 50 over MCP) |
| restart | bool | No | Stop a different run already going in the same slot and start this one |
cfa simulate_input --steps '[{"keys":["W"],"seconds":2},{"keys":["D"],"seconds":1.5},{"keys":["W","A"],"seconds":2},{"keys":["LeftShift","W"],"seconds":2}]'
cfa simulate_input --steps '[{"keys":[{"key":"MouseX","value":3}],"seconds":1},{"keys":["SpaceBar"],"seconds":0.2}]'
cfa simulate_input --world client1 --steps '[{"keys":["S"],"seconds":1}]'list_cheatsList the cheats and exec functions the local player's console can run
| Parameter | Type | Required | Description |
|---|---|---|---|
| world | string | No | Play world whose local player runs the cheats: server, client1... (default: the first world with a local player) |
| filter | string | No | Only cheats whose name contains this text |
| max_results | int | No | Most cheats listed |
cfa list_cheats
cfa list_cheats --filter Teleport
cfa list_cheats --world client1call_cheatRun a cheat for the local player (God, Fly, Slomo 0.5, the game's own) with a verdict
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Cheat name as list_cheats shows it |
| args | string | No | Arguments separated by spaces, as typed in the console |
| world | string | No | Play world whose local player runs it: server, client1... (default: the first world with a local player) |
cfa call_cheat --name God
cfa call_cheat --name Slomo --args 0.25
cfa call_cheat --name EnableCheats --world client1get_runtime_objectRead any object of a play world: game mode, game state, players, HUD, camera, game instance, subsystems, or an actor
| Parameter | Type | Required | Description |
|---|---|---|---|
| object | string | Yes | game_mode, game_state, world_settings, game_instance, player_controller:N, pawn:N, player_state:N, hud:N, camera:N, local_player:N, subsystem:<Class>, subsystems, an actor name or label, or a full object path |
| world | string | No | |
| property_path | string | No | Return only this property's value (dotted paths and [N] indices work) |
| filter | string | No | Properties whose name contains this text |
| max_results | int | No | Most properties listed |
cfa get_runtime_object game_state
cfa get_runtime_object pawn:0 --world client1 --property-path CharacterMovement.MaxWalkSpeed
cfa get_runtime_object subsystems --world server --filter Nav
cfa get_runtime_object subsystem:MyScoreSubsystem --world serverget_runtime_worldEach play world's time, pause, speed, game mode and state, and players with pawn and ping
| Parameter | Type | Required | Description |
|---|---|---|---|
| world | string | No | server, client1..., all_clients, instance:N or all (default) |
cfa get_runtime_world
cfa get_runtime_world --world client2set_runtime_timeSlow down, speed up, pause or resume the running game (server-owned; clients follow)
| Parameter | Type | Required | Description |
|---|---|---|---|
| world | string | No | server (default) or instance:N; clients follow the server |
| time_dilation | float | No | Global time dilation: 1 normal speed, 0.5 half, 2 double |
| paused | bool | No | true pauses the game, false resumes it |
cfa set_runtime_time --time-dilation 0.25
cfa set_runtime_time --paused
cfa set_runtime_time --paused=false --time-dilation 1get_runtime_networkNetwork per play world: connections with ping, jitter, packet loss, bandwidth, and the emulation in effect
| Parameter | Type | Required | Description |
|---|---|---|---|
| world | string | No | server, client1..., all_clients, instance:N or all (default) |
cfa get_runtime_network
cfa get_runtime_network --world serverset_network_emulationSimulate lag, jitter and packet loss on a running session, per world, then measure it
| Parameter | Type | Required | Description |
|---|---|---|---|
| world | string | No | server, client1..., all_clients, instance:N or all (default) |
| profile | string | No | Off, Average, Bad, or another profile from the project's Network Settings |
| settings | json | No | Packet simulation fields by name: PktLag, PktLagVariance, PktLagMin, PktLagMax, PktLoss, PktIncomingLoss, PktIncomingLagMin, PktIncomingLagMax, PktDup, PktOrder, PktJitter... |
| reset | bool | No | Clear every emulation setting first |
cfa set_network_emulation --profile Bad
cfa set_network_emulation --world client1 --settings '{"PktLagMin":150,"PktLagMax":200,"PktLoss":10}'
cfa set_network_emulation --resetget_runtime_movementMovement and prediction of pawns per world: mode, velocity, ground, gap to the server, saved moves, smoothing
| Parameter | Type | Required | Description |
|---|---|---|---|
| world | string | No | server, client1..., all_clients, instance:N or all (default) |
| actor | string | No | One actor by name, label or keyword (pawn:0); default every pawn with a movement component |
| max_results | int | No | Most rows over all worlds |
cfa get_runtime_movement
cfa get_runtime_movement --world client1 --actor pawn:0watch_runtime_movementWatch movement for N seconds (optionally pressing keys) and count server corrections, with a verdict
| Parameter | Type | Required | Description |
|---|---|---|---|
| seconds | float | No | Seconds to watch when no steps are given (0.2 to 60) |
| steps | json | No | JSON array of steps, each {"keys":[...],"seconds":N}, as simulate_input takes them |
| input_world | string | No | With steps: the world whose local player presses the keys (default the first client, else the server) |
| actor | string | No | One server pawn by name, label or keyword (pawn:1); default every pawn with a movement component |
| max_error | float | No | A correction farther than this, in units, fails the verdict |
| wait | bool | No | Wait until it finishes and return the result (false = return at once; repeat the same call to collect it) |
| wait_timeout | int | No | Seconds to wait before returning a still-running job (default 100; 50 over MCP) |
| restart | bool | No | Stop a different watch already running and start this one |
cfa watch_runtime_movement --seconds 5
cfa watch_runtime_movement --input-world client1 --steps '[{"keys":["W"],"seconds":2},{"keys":["W","D"],"seconds":2}]'compare_runtime_actorOne server actor's values next to each client copy's, with mismatches and a verdict
| Parameter | Type | Required | Description |
|---|---|---|---|
| actor | string | Yes | The server actor: name, label or keyword (pawn:1, game_state, player_state:0) |
| properties | string | No | Property paths separated by commas; default the replicated Blueprint variables |
| max_results | int | No | Most properties compared |
cfa compare_runtime_actor pawn:1 --properties Health,CharacterMovement.MaxWalkSpeed
cfa compare_runtime_actor game_stateget_runtime_widgetsIn-game UMG widgets per world, and one widget's tree with the text each child shows
| Parameter | Type | Required | Description |
|---|---|---|---|
| world | string | No | server, client1..., all_clients, instance:N or all (default) |
| filter | string | No | Only widgets whose name or class contains this text |
| widget | string | No | Show this widget's tree |
| depth | int | No | With widget: levels of children shown |
| all | bool | No | Also list user widgets that are not on screen |
| max_results | int | No | Most rows |
cfa get_runtime_widgets --world client1
cfa get_runtime_widgets --widget WBP_HUD_C_0 --world client1