Animated heart rate, ECG and patient vitals displays that behave like the real thing.
Suitable for games and medical simulation. You supply the numbers, this draws them.On Built-in or HDRP, run Tools > Vitals Display > Set Up For This PipelineAnimated heart rate, ECG and patient vitals displays for Unity, built to read like the real thing. Drop in a prefab, set a heart rate, and you have a running monitor.A display layer. Bring your own source. It draws the numbers you give it, wherever they come from: your game state, your own simulation, or a heart rate plugin you already own. Those plugins produce a number and draw nothing. This is what draws it.Written for two audiences and equally for both. Game Environments: horror, sci-fi, medical drama, anything with a bedside or a medbay in it. Game HUDs: suitable for overlay UI, makes a great health bar!Medical simulation: where the screen has to behave like a monitor while your own software decides what the numbers are.Everything you see is data, not code. Rhythms and styles are ScriptableObjects. Duplicate one, change the fields, and it is yours - a new rhythm, a new look, no scripting, no enum to extend, no recompile. An editor preview window draws a preset while you edit it, without entering play mode.It animates rather than loops. Every vital is continuously animatable on an AnimationCurve, and one rhythm crossfades into another over a duration you set. So you can fade a trace to a flatline over thirty seconds and land exactly on the flatline event. Assets built from looping clips cannot do that.What it is not. Not a medical device, and not a sensor integration - it reads no watch, chest strap or hardware of any kind. It does not model cause and effect: no defibrillation, no drug response, no physiology. Not in this version: waveform analysis, twelve-lead output, networked monitors, data export.Support: support@brianduffy.games. Include your Unity version and which render pipeline you are on.What is in it15 rhythm presets, 9 style profiles and 4 waveform shapes, 28 ScriptableObjects in all.13 prefabs: 4 themes - minimal, horror, sci-fi, clinical - each as a world panel, as that panel on a plain housing, and as a uGUI HUD, plus a fully modelled ECG machine.40 scripts across 3 assembly definitions, 4 shaders, 19 materials, 18 audio clips, 9 UI sprites and 4 demo scenes.A PDF manual, including a plain English page on what each rhythm means on screen.RhythmsFifteen ship as data assets: normal sinus, sinus bradycardia, sinus tachycardia, supraventricular tachycardia, atrial fibrillation, atrial flutter, first-degree AV block, ST elevation, pulseless electrical activity, VT, pulseless VT, torsades de pointes, VF, agonal and asystole. Duplicate one and edit the fields to author your own; every field has a tooltip. Pulseless is a checkbox on any preset, including the normal one. Complex widths are in milliseconds and never scale with rate, so raising the heart rate changes the gaps between beats and not the shape of the beat.Ectopic beatsOne early, misshapen complex with a compensatory pause after it, without changing the rate or the rhythm. Fire it from code, or drop on the component and pick a pattern: random at a frequency you set, bigeminy, trigeminy, couplets, or runs of a length you choose. It ships wired and switched off on the horror prefabs.Waveforms and channelsFour channels - ECG, pleth, capnography and arterial pressure - each with its own generator and display buffer. The pleth and the arterial line take their beats from the ECG and flatten when the rhythm carries no pulse, so a pulseless rhythm reads correctly across the whole panel; capnography runs on the respiration rate instead. Sweep and scroll trace modes, and a trace column count you set.Channel and readout counts are per theme. Minimal and horror draw one channel and one readout, sci-fi two and two, clinical four channels and seven readouts. The modelled machine carries the clinical panel on its screen, so it has the same four and seven. Arterial pressure is on the clinical tier only.Readouts, alarms and blood pressureEight readout sources, driven from one component onto a TextMeshPro label with your own prefix, suffix and decimal places. Per-vital alarm limits with three severities, latching and a timed mute. A blood pressure cuff cycle that inflates, measures, blanks its reading while it works, and has a modelled failure state. The alarm limits and the cuff cycle live on every monitor whatever the theme; the alarm banner and the indicator light are wired up on the clinical prefabs and the machine.Feeding it from your own sourceSet a property and the display follows. Where the number arrives slowly, jumps, or stops arriving, an optional feed component smooths each vital over a duration you set and reports it lost when nothing has arrived for a while, blanking the readouts that depend on it and raising an event. Every vital can also be driven straight from an AnimationCurve: rate, amplitude, complex width, saturation, respiration, temperature and carbon dioxide.RenderingThree renderers on one generator: a shader quad, a LineRenderer, and a uGUI RawImage path that needs no capture camera. The shader path draws at a flat cost whatever the column count; the LineRenderer path also covers any platform without two channel float texture support. RenderTexture output is there for curved screens, several surfaces from one panel, or your own mesh.Shaders are hand-written HLSL. No Shader Graph, no render pipeline package dependency, and no LightMode tag on the pass, so one shader serves more than one pipeline.Render pipelinesBuilt-in, URP and HDRP, each built, run and rendered. Everything the package draws is unlit and pipeline independent except the modelled machine, which is lit geometry: a housing material and a glass material ship per pipeline, six in all, and a menu item assigns the right pair and reports what it changed.VR and platformsWorks in stereo, verified on a Meta Quest 3 under Single Pass Instanced. All four shaders compile a stereo instancing variant, and the trace was confirmed drawing correctly in both eyes on device. The optional capture path renders a panel once for both eyes rather than once per eye. Nothing about VR ships in the package and no demo scene assumes an XR rig: drop your own rig into any demo scene.PerformanceLightweight, and built for VR and mobile. Waveform generation runs at a fixed 250 Hz independent of frame rate; panel refresh defaults to 30 Hz and is set separately, which is the setting to lower first on a constrained target. Drawing is one quad per channel whatever the trace resolution, and a readout rebuilds its string only when its number changes. Everything the trace needs is allocated once at startup and never reallocated.Audio18 clips, 48 kHz 16-bit mono WAV, in 3 tone sets of 6: a beat pip, a flatline tone, three alarm severities and a mute. Generated, not sampled. Loop clips hold a whole number of cycles so they wrap without a crossfade. Swap sets by pointing at a different folder.IntegrationEvery event has a UnityEvent for the inspector and a plain C# event for code: beat, flatline, alarm raised and cleared, cuff complete and cuff failed, signal lost and restored. No native plugins, no unsafe code, no platform-specific code, and no reflection over your types. The Input System is not required and does not conflict. A scripting define switches on diagnostics, so a renderer that cannot draw says why instead of drawing nothing. The authoring tooling and the test assemblies are excluded from the package; the preset preview window and the pipeline setup menu item ship with it.Requirements and dependenciesUnity 6.0 LTS or newer, authored in 6000.0.82f1.TextMeshPro and uGUI, both of which ship with Unity. Nothing else.Third-party contentNo third-party code, art, audio or models. The manual is typeset in Liberation Sans under the SIL Open Font License 1.1, and a subset is embedded in that PDF as the licence permits. No font file is installed by this package.AI assistance was used during development of this package. Claude (Anthropic) was used as a coding assistant for parts of the C# implementation and to help draft the documentation. All code was designed, reviewed, edited and tested by the publisher in the Unity Editor and on target hardware, and all documentation was fact-checked and rewritten against the shipped behaviour.No art was created using AI.




