Unity UI Scripts
6 free C# scripts 3 beginner3 intermediate Unity 2022.3+ MIT licensed
These scripts cover the in-game UI most action and RPG projects need. A health bar with smooth fill and a damage flash, floating damage numbers, a screen fader for scene transitions, a tooltip that keeps itself on screen, and a minimap drawn from a render texture.
They are built for Unity's Canvas-based UI (uGUI), so each needs a Canvas in the scene, and Health Bar UI reads from the Health System through its events instead of checking every frame. Health Bar UI Pro adds a delayed damage trail, shield overlay and a boss-bar mode.
Start with Health Bar UI
World-space or screen-space health bar with smooth fill, color gradient, and damage flash. Attach to enemies or use as HUD.
HealthBarUI.cs · 8 Inspector fields · beginner
Open Health Bar UIAll 6 ui scripts
- Health Bar UI World-space or screen-space health bar with smooth fill, color gradient, and damage flash. Attach to enemies or use as HUD.
- Screen Fader Simple screen fade-in/fade-out with configurable color and duration. Great for scene transitions.
- Damage Popup Floating damage numbers that animate upward and fade out. Supports critical hits, healing, and custom colors.
- Tooltip System Dynamic mouse-following tooltip that auto-positions to stay on screen. Supports rich text and custom layouts.
- Minimap System Render texture minimap with player icon, enemy blips, objective markers, and zoom control.
- Health Bar UI ProPro Advanced health bar with delayed damage indicator, shield overlay, boss mode with phase markers, and segmented health display.
What these scripts need
Read from each script's source, so this list stays in step with the code.
Uses uGUI (UnityEngine.UI): needs a Canvas in the scene.
3 of 6: Health Bar UI, Screen Fader, Health Bar UI Pro
Uses TextMeshPro (the TMPro namespace) for text.
3 of 6: Damage Popup, Tooltip System, Health Bar UI Pro
Calls DontDestroyOnLoad, so the object survives scene loads. Place it once, in your first scene.
Applies to: Screen Fader
Reads the legacy Input Manager (UnityEngine.Input). If Project Settings > Player > Active Input Handling is set to Input System Package only, Unity throws an InvalidOperationException; set it to Both.
Applies to: Tooltip System
Kits that build on them
- 2D Platformer Starter Kit Complete 2D platformer foundation with movement, camera, advanced mechanics, health, collectibles, and transitions.
- RTS Starter Kit Real-time strategy foundation with camera, click-to-move navigation, unit selection, minimap, and wave spawning.
- RPG Essentials Kit Core RPG systems: health, inventory, dialogue, quests, save/load, and damage numbers — everything for an RPG prototype.
- UI Toolkit Kit Essential game UI components: health bars, damage numbers, tooltips, minimap, screen fader, and timer display.
Guides that use them
- Free Unity C# Scripts and Game Systems: 55 Copy-Paste Tools for Indie Games A catalog of 55 free Unity C# scripts and 13 game systems: movement, camera, health, save/load, UI, AI, mobile controls, inventory and dialogue.
- Unity vs Unreal for Indie Developers in 2026: An Honest Comparison Unity vs Unreal for solo and small-team games: iteration speed, C# vs Blueprints and C++, licensing costs, hardware, build size, platforms, and where each engine clearly wins.
- Unity 2D Platformer Tutorial: Free Scripts & Complete Setup Build a complete 2D platformer in Unity with free scripts for player movement, camera follow, collectibles, health, and polish effects. Step-by-step guide with code.
- How to Build an RPG Quest System in Unity Build a complete RPG quest system in Unity with ScriptableObject-driven objectives, branching conditions, and persistent progress tracking.
- Unity UI Tutorial: HUD, Tooltips, Minimaps and More Build professional game UI in Unity: health bars, damage popups, tooltip systems, minimaps, and screen transitions. Complete C# tutorial with free scripts.