kyubuns/lightweightfpscounter — explained in plain English
Analysis updated 2026-05-18
Add a lightweight FPS overlay to a Unity project using URP.
Debug which stage, CPU or GPU, is causing a frame rate drop.
Read live FPS and frame timing values from your own game code.
Swap in a custom bitmap font to match your game's visual style.
| kyubuns/lightweightfpscounter | kkongry0819/6657upup | yaog6700-bit/swell-ssh | |
|---|---|---|---|
| Stars | 24 | 24 | 24 |
| Language | C# | C# | C# |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 2/5 | 2/5 |
| Audience | developer | general | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires Unity 6.3+ and Frame Timing Stats enabled in Player Settings, otherwise values read zero.
LightweightFpsCounter is a Unity plugin that displays a small on screen FPS counter, built specifically for the Universal Render Pipeline and designed to add as little runtime cost as possible while running. It shows the current frame rate along with a one second average, plus a breakdown of CPU total time, main thread time, present wait time, render thread time, and GPU frame time, all measured through Unity's own FrameTimingManager. Every metric shown on screen can be turned on or off individually, and every text label can be edited freely. Values can automatically switch to warning or error colors once FPS drops below, or a frame time rises above, thresholds the developer sets. Other adjustable settings include how many frames get averaged into each update, text scale, which corner of the screen the display anchors to, margins, and colors. The bitmap font used for the numbers can also be swapped out for a custom font atlas of any glyph and cell size. For developers who want to read the numbers directly in their own code, the values are exposed through static properties like LightweightFpsCounterHud.LatestFps. The plugin produces zero garbage collection allocations while running, which matters for a tool meant to measure performance without affecting it. It requires Unity 6.3 or newer and the Frame Timing Stats option enabled in Player Settings, otherwise every value reads as zero. Installation is done through Unity's Package Manager using a git URL, followed by placing the included prefab into the project's first scene. By default the measurement and rendering code only exists in the editor and in Development Builds. Regular release builds ship with an inactive stub instead, so the counter does not run in production unless a developer deliberately defines a special compiler flag to enable it. The README explains that if a project wants the counter's assets, such as its font texture and shader, fully excluded from a release build, the prefab needs to be removed from every build input path, including Addressables groups, Resources folders, and scenes. The README also documents in detail how the plugin keeps its overhead low, covering things like reusing one shared mesh, updating only the digit regions that change, and pre recording its draw call into a command buffer. The bundled font is monogram by datagoblin, released under CC0. The README credits the code as generated with Claude Fable 5 and ChatGPT 5.6.
A minimal, low overhead on screen FPS counter plugin for Unity's Universal Render Pipeline, showing detailed CPU and GPU frame timings.
Mainly C#. The stack also includes Unity, C#, Universal Render Pipeline.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.