Skip to content

The Systems Panel

The Systems panel lists every system of your game in the order they run, with how long each one takes in a frame. It opens at the bottom, beside the Console. It has two tabs: Systems, each system and what it costs, and Frames, each frame and what took its time.

Press Play. Each row is one system, in a group for the part of a frame it runs in:

GroupWhen its systems run
StartupOnce, as the game starts
Before fixedAt the start of each frame (First, PreUpdate)
FixedAt each fixed step, which can be more than once a frame
UpdateEach frame (Update, PostUpdate)
RenderAs the frame is drawn (PreRender to Last)
ObserversWhen the event they observe is sent

Your scripts come first in each group, in the order they run. The engine’s own systems are folded into one line, such as ”+ 11 engine systems · 0.88 ms”. Press Engine to list them one by one.

A row shows the system’s name, its Scene, what it is doing Now, and its time: the mean of the last frames, in milliseconds. A time shorter than the browser can measure shows as <0.01. Each group’s header has its total.

Now saysWhat it means
(nothing)It ran
slowIt took 0.5 ms or more a frame
main pausedIts Scene is paused, as a shop opened over the level pauses the level
not loadedNone of its Scenes is loaded
a conditionA run condition was false. The condition’s name is shown, so give your run conditions one
offIts script is turned off
at startIt runs once, as the game starts
threwIt threw an error

The top of the panel says how long a frame takes and how many frames a second the game runs at.

  • Type in Search systems to find one by its name or its file. A search finds the engine’s systems too.
  • Slow lists the systems that take 0.5 ms or more a frame.
  • Not running lists those that wait: for a run condition, a paused Scene, or a Scene that is not loaded.
  • Off lists the scripts that are turned off.

Click a row. Under the list you see where in the frame it runs (“Update, after chore-spawn”), its Scene, and what it did last frame.

  • Open in Code opens its script in the Code panel.
  • Turn off turns its script off, and Turn on turns it on again. Off is for everyone, in this game and in the built one, and is kept in scripts.json in the scripts folder.
  • More shows the system alone in the Frames tab.

The game pauses at the end of the frame in which a system first throws, so you can see what happened. Its row turns red and opens to show the error, and the file and line it was thrown at.

  • Open in Code opens the script at that line.
  • Show in Console shows the Console, where the error is too.
  • Ask the Agent puts a question about the error in the Agent panel’s box. Read it, change it if you like, and press Enter to ask. It is there when you edit the Project online.

Fix the script and save it: the game takes the new version in place. Press Resume to go on.

Before you press Play, the list shows the systems in the order they run, with no times. Only systems that run in edit mode run then, and they say runs in edit mode.

Frames shows each frame the game played, and what took its time. It records from the moment you press Play.

Each bar is one frame of the last 150, the newest on the right, as tall as the frame took. The dashed lines are at 8.3 ms, which keeps 120 frames a second, and at 16.7 ms, which keeps 60. A bar over 8.3 ms is yellow, and one over 16.7 ms red: a frame that long is one a player can see as a stutter.

Click a bar, or move to it with the arrow keys, to see that frame. Under the graph:

  • Its systems, slowest first, each with its Scene, its schedule, the entities of its queries, and its time. A fixed system that ran more than once in the frame says so, as FixedUpdate ×2. Click a system to see it alone.
  • Where its time went: before the fixed steps, the fixed steps, Update, Render, and the time outside systems, which is the engine’s own work between them.
  • For a frame over 16.7 ms, its slowest system against its usual time (“chore-spawn took 9.40 ms, 30 times its usual 0.31.”), and a query of it whose entities grew by half or more in the second before. Look at shows that system alone.

While the game is open on your phone (On your phone in the Game view, see Phones and Tablets), This editor | Phone above the graph switches to the phone’s frames: the game as your phone plays it, recorded from the moment it opened. The switches for Recording and pausing are this editor’s, and are not shown for the phone.

More in the Systems tab, a system in a frame’s list, or Look at shows one system:

  • Time: its time in each frame recorded as a line, and its time Now, its Usual time (the median), its Slowest, and its Share of frame.
  • What it works on: each of its queries, the components it asks for, and how many entities it had in the last frame. A query whose entities grew by half or more in the last second says so.
  • When it runs: its schedule and the systems just before and after it, its Scenes, its run conditions, what it did in the last frame, and its last error.

Open in Code, Turn off and Ask the Agent do as they do in the Systems tab. ← Frames goes back to the frame you came from.

  • Recording is on unless you turn it off. Turned on again, it starts over.
  • Pause the game on a frame over 16.7 ms pauses the game at the end of the first such frame after the scene has loaded, and that frame’s note says “the game paused here”. Press Resume to go on.
  • Pause the game when a system first throws is on unless you turn it off. Turned off, an error is told in the Console and the game plays on.

The three switches are kept for your next Play.

The Agent reads the same frames with its get_frame_stats tool: the frames a second, the usual and slowest frame, the slowest systems with their entities, the frames over 16.7 ms and what took each, and the queries that grow. Ask it why your game stutters, and it starts there. It reads the last 600 frames, those it steps through itself too, so after a fix it plays the game on and looks again.