Debug Views and Profiling
SeinARTS ships debug views that draw simulation data over the world, a command log that shows what the match is running, console commands for every layer, and trace scopes for Unreal Insights. This guide shows how to turn each one on and how to read it.
Debug views and on-screen warnings are for Development builds and the editor. Shipping builds compile their drawing out, and they have no console to type a command in.
1. Debug views
Section titled “1. Debug views”Open a level viewport, or press Play, and open the viewport’s Show menu. The SeinARTS submenu has four toggles. They work in the level viewport and in a Play-in-Editor viewport:
| Toggle | Draws | Console |
|---|---|---|
| Navigation | The navigation grid: walkable and blocked cells, dynamic blockers, and the path each moving unit follows. | Sein.Nav.Show [0|1|on|off] |
| Fog of War | The vision grid: which cells the local player sees or has explored. | Sein.FogOfWar.Show [0|1|on|off] |
| Steering | Each unit’s footprint ring, velocity and avoidance steering. | Sein.Show.Steering [0|1|on|off] |
| Extents | Each entity’s authored extents, boxes and capsules, as red wireframes. | Sein.Show.Extents [0|1|on|off] |
Each console command with no argument flips the view. A panel in the corner explains the colours.
Narrow a view when it is too busy:
Sein.Nav.Show.Layer <0-7>shows only blockers that affect one navigation layer: 0 is Default, 1 to 7 are the layers you named in the navigation settings. With no number it shows all.Sein.Nav.Show.RawCells 0|1hides or shows the raw planned cells of each path, before smoothing. It is1by default.Sein.FogOfWar.Show.Player <0-255>shows another player’s vision instead of the local player’s, which is useful against an AI. With no number it resets.Sein.FogOfWar.Show.Layer <0-7>shows one vision layer: 0 is Explored, 1 is Normal, and 2 to 7 are your custom layers.
The views draw only near the camera. Under Project Settings > Plugins > SeinARTS, category Debug:
| Setting | Default | Effect |
|---|---|---|
| Show Legends | On | The colour panels. Turn off to leave only geometry and labels. |
| Draw Distance | 10000 | How far from the camera, in world units, views draw. Raise it for a zoomed-out tactical view. |
| Draw Limit | 50000 | Most elements drawn per colour bucket, nearest first. Drop it to 50 to 200 to focus on the camera. |
| Cull Outside View | On | Skip anything off screen. Turn off for a minimap-driven capture. |
The navigation and fog views show baked data. If the grid is empty, select the Sein Level Volume and press Bake Level Data.
2. The command log
Section titled “2. The command log”The command log shows every command the simulation runs, with its tick and player. It answers “what did the match do,” and it is the quickest way to compare two machines: the commands that change the simulation are identical on every machine.
- Use a HUD class derived from Sein HUD. It draws the overlay.
- In the console, type
Sein.Commands.ShowLog. The overlay shows the last 24 commands of the 256 it keeps. - A line reads
[T0123] P1 E012and then a description: the tick, the player, and the entity (E×3for a command on three entities). An ability activation readsActivateAbility [tag] @ (x, y, z). An order readsBrokerOrder, with the click context and, once it dispatches, “Resolved to” the abilities it picked. A command type of your own shows as its tag. Sein.Commands.ClearLogempties the log.
The log leaves out observer records, meaning each player’s camera and selection, because they differ per machine. Sein.Commands.ShowLog.Observer toggles them back in.
3. Console commands
Section titled “3. Console commands”The full list is in Console Commands. The ones you reach for:
| Goal | Command |
|---|---|
| Is the match running? | Sein.Net.Status: phase, slot, turns, players, and recording. On the host, WaitingFor names the player the match is waiting on. |
| What is the state’s checksum? | Sein.Sim.Checksum logs it with the capture time. Sein.Net.DumpState [1|2] adds tick, entities, seed and the checksum of each part. |
| Hunt a desync | Sein.Net.LogChecksumParts, Sein.Net.SimulateDesync. See Debug a Desync. |
| Run the lobby from the console | Sein.Net.Lobby.Status, .SetSlotState, .SelectMap, .StartMatch and others. |
| Pause a network match | Sein.Net.Pause, Sein.Net.Resume. |
| Replays and saves | Sein.Net.LoadReplay, SeekReplay, StopReplay, SaveReplay, DumpSnapshot, LoadSnapshot. |
| A/B the threading | Sein.Sim.Parallel 0|1, and Sein.Sim.ParallelMinBatch <count>. |
| Debug box selection | Sein.Marquee.Debug.Show draws the test hull. Sein.Marquee.DebugLog logs why a unit was or was not picked. |
| Hide the destination preview | Sein.Preview.Disable 1. |
| Create load | Sein.Perf.MoveOwned [Count] [X Y Z] selects your first Count movable units (100 by default) and orders them 3000 units along world +X from their centre, or to X Y Z. Development builds only. |
| Separate simulation from rendering | Sein.Perf.SkeletalMode NoAnim freezes visible skeletal meshes, and Hidden stops rendering them. Development builds only. |
4. What to profile
Section titled “4. What to profile”Two budgets matter.
- The simulation tick. At the default 30 ticks a second, one tick has 33 ms of wall-clock time on average. If ticks cost more than that, the simulation falls behind. The log then says “Simulation falling behind for N s (continuous). Sim cannot keep up”. Raise Max Ticks Per Frame only to ride out spikes. Fix a sustained overrun by lowering Simulation Tick Rate or making a tick cheaper.
- The frame. Presentation runs once per rendered frame: the bridge syncing actors, view models refreshing, widgets, animation and rendering.
To tell them apart, run Sein.Perf.SkeletalMode Hidden. If the frame time collapses, the cost is skinned meshes. If it barely moves, look at the simulation.
Capture a trace
Section titled “Capture a trace”- Run your Development build with
-trace=cpu,frame. Reproduce the slow case, for exampleSein.Perf.MoveOwned 300. - Open the trace in Unreal Insights and select the Timing view.
- Find the simulation’s bar, named
Sein TickSimulation [<world path>]. Its children are the work in one tick.
The scopes
Section titled “The scopes”| Scope | What it measures |
|---|---|
Sein TickSimulation [...] |
A whole simulation tick. |
One scope per registered system, such as seinarts.movement.driver, seinarts.core.command_broker, seinarts.fog_of_war.stamp, or your own |
One system’s tick. This is how you find the expensive system. |
Sein_World_ProcessCommands, Sein_World_TickAI |
The tick’s commands, and the host’s AI thinking. |
Sein_World_TickCompletedObservers, Sein_World_FrameCompletedObservers |
Code that listens to tick and frame completion. |
Sein_Movement_*, Sein_Formation_*, Sein_Collision_*, Sein_Latent_* |
Parts of movement, formation orders, collision and abilities. |
Sein_Presentation_ActorBridgeSync, Sein_Presentation_UIRefresh, Sein_Minimap_*, Sein_Fog_Render_RebuildTexture |
Presentation: the bridge, the view models, the minimap and fog rendering. |
Sein_World_CaptureState, Sein_World_ComputeChecksum, Sein_State_* |
Saving and checking state. |
Read the trace in this order: the simulation tick, then the heaviest system under it, then the scopes under that system. A system that grows with unit count is the first thing to make cheaper.
Then A/B. Run the same load with Sein.Sim.Parallel 0 and 1. A parallel pass pays off only when enough entities share the work, so Sein.Sim.ParallelMinBatch (default 64) decides how many. If the desync check is expensive (Sein_World_ComputeChecksum is wide), raise Determinism Check Interval Turns.
Test it
Section titled “Test it”- Press Play, open Show > SeinARTS, and enable Navigation. The grid appears around the camera, and a selected unit that is moving shows its path.
- Type
Sein.Commands.ShowLog. Right-click to order a unit. ABrokerOrderline appears. - Type
Sein.Perf.MoveOwned 100. Open Insights and findSein TickSimulation. - Look for the scope of one of your own systems in the trace.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause |
|---|---|
| No SeinARTS submenu in Show | The editor module is not loaded, or you are in a packaged build. |
| A view draws nothing | There is no bake, or the camera is farther than Draw Distance from the data. Press Bake Level Data on the level volume and raise Draw Distance. |
| The command log shows nothing | The HUD does not derive from Sein HUD, or only observer commands ran. |
| The log overlay differs between two windows | You turned on the observer filter. Turn it off to compare simulation commands. |
No Sein scopes in Insights |
The cpu trace channel was not enabled. Start the game with -trace=cpu,frame. |
Sein.Perf.* is unknown |
It is registered in Development builds only. |