Skip to content

Stratkit Profiling Tools

Adds a set of profiling tools, such as monitor draw calls, memory, fps, etc.

ProfilerOverlay

One canvas with three panels: the FPS counter, the memory usage readout and the render stats. Drop the Runtime/Prefabs/ProfilerOverlay prefab into the first scene of the game. It stays alive across scene loads and draws at sorting order 9500, above the loading screen and the floating text, below the error display. It scales against a 1080-unit screen height, and turns that reference with the screen so a portrait phone shows the panels at the size a landscape one does.

Without cheats and without the SHOW_FPS_COUNTER define the overlay removes itself on the first frame.

Layout

Each panel can be shown, hidden and moved to one of eight screen slots: the four corners and the four edge centers. Panels sharing a slot stack vertically or horizontally, sorted by width, so the widest sits against the screen edge its slot touches. Stacked vertically that means a bottom slot grows upward and a top slot downward. Stacked horizontally a right slot grows leftward and a left slot rightward.

Size and leading number

The memory and render panels each lead with one number and come in three sizes. Small shows the leading number alone. Medium adds the next most useful ones: the change over the last seconds for memory, two more counters for render. Large shows every number the panel has. The memory panel also grows wider with each size, so its bars show more samples.

The leading number is a choice per panel: resident, allocated or managed memory; draw calls, SetPass calls, batches, triangles or vertices. Colors, the bar graph, the change and the never-dim limit all follow it. A panel never gets narrower than its texts need, whatever its size says.

Graphs and legend

Every panel has a bar graph behind its text, one bar per readout, newest at the right, switchable per panel and off by default for FPS. Bars stay a quiet grey while the reading is fine and take a muted form of the reading's color once it passes a threshold, so a yellow or red stretch in the history shows without competing with the number. A full bar is the memory budget, the frame rate the app can reach, or a ceiling set on the render panel per kind of number.

PerfOverlayLegend covers the screen with the live numbers next to what they mean, each colored as its panel colors it, says what a bar stands for and how far back the graph reaches, and lists the ceilings, where the colors change and the dimming rules as they are set. The panels step aside while it is up, and it stays until its button closes it.

Auto-dim

A panel fades down to a low alpha once its value holds still, and comes back on the next real change. Waking takes a bigger move than staying awake, so a panel that just faded does not pop back on the drift it was already ignoring. A panel at an edge value never fades: FPS below its share of the reachable frame rate, memory above its share of the budget, the render lead above its share of a full bar. The render panel follows the first number on its line, so a counter switched off never drives the fading. Panels keep sampling while faded.

These are prefab config, not cheats. Delay, dim alpha and the two steps sit on each panel; the two fade durations sit on the overlay.

Cheats

The Jahro group is Perf Overlay, and every setting is remembered between sessions. A panel lists Enable while it is hidden or Disable while it is shown. Its own commands appear after PerfOverlayMoreSettings is pressed and go again when the console closes, so the group stays short for anyone who just wants the panels. A setting with two states lists the command that flips it, FPSGraphEnable or FPSGraphDisable, so the list itself reads the state. Jahro sorts a group alphabetically, so the names start with the panel.

Always Per panel, while it is shown, after more settings
FPSEnable / FPSDisable FPSPosition, FPSAutoDimEnable / Disable, FPSGraphEnable / Disable, FPSUpdateEveryFrame, FPSUpdateInterval
MemoryEnable / MemoryDisable MemoryPosition, MemorySize, MemoryMain, MemoryAutoDimEnable / Disable, MemoryGraphEnable / Disable
RenderEnable / RenderDisable RenderPosition, RenderSize, RenderMain, RenderAutoDimEnable / Disable, RenderGraphEnable / Disable
PerfOverlayReset, PerfOverlayLegend, PerfOverlayMoreSettings PerfOverlayStacking

Per game

The texts use the monospace Ubuntu Mono font that ships in the Jahro console package, so numbers keep their width as they change. Override the font, the colors or the thresholds on the scene instance.

Which panels start visible, where, how big, and with which leading number is the Defaults block of the ProfilerOverlay component. Override it on the scene instance. SHOW_FPS_COUNTER starts the FPS and memory panels visible whatever that block says; note it is a per-platform scripting define, so a game has to add it to every platform it wants it on. A saved choice from Jahro wins over both.

FPSCounter

Frames per second, colored by its share of the frame rate the app can reach, so one threshold list serves a 30 and a 60 target. It counts on unscaled time, so the number keeps moving while the game is paused. A full bar of its graph is the frame rate the app can reach at best: the display refresh rate under vSync, except on phones which ignore vSync, otherwise the target frame rate, otherwise the platform default.

MemoryUsageDisplay

Memory the app uses right now, the change over the last 10 seconds at Medium and Large size, and a bar graph of the last samples. Three numbers are on offer, all from counters Unity keeps in release players: resident (System Used Memory, the process memory the OS reports, so assets, code, plugins and the heap all count), allocated (Total Used Memory, what Unity's own allocators handed out) and the managed heap (GC Used Memory, under Mono and IL2CPP alike). The panel leads with one of them and lists the others when it is large. The bars fill against a memory budget: a share of device RAM on iOS and desktop, a table by device RAM on Android, because the Play vitals limits grow slower than RAM. The text color follows the same share. In the editor the number is the editor process, not the game.

RenderStatsDisplay

Draw calls, SetPass calls, batches, triangles and vertices on one line. The panel leads with one of them and its size decides how many follow. SetPass calls is the default lead: under the SRP Batcher a SetPass is one shader bind, so it tracks the SRP batch count the Frame Debugger shows, and unlike the batcher's own profiler markers it exists in release players. Each number is the worst frame since the last readout, because they swing frame to frame. A bar graph behind the text follows the leading number, with a full bar at a ceiling set on the panel per kind of number, and the colors follow the same scale: the leading number's share of that ceiling. The panel width follows the text. It reads the render counters Unity keeps in release players, so it works on a device without a development build.

RuntimeProfiler

Tool to monitor draw calls, memory, and other performance metrics. To use, add a canvas with a text component, and the RuntimeProfiler component to an initialization scene. Then, press the UpdateCategories button to populate all supported profilers, and enable the ones you want to monitor.

If you have cheats enabled, they will also be added.