Build an Idle Game
Passive income, upgrades, offline earnings, and prestige — the core loop for idle and incremental games.
Learning Path
Follow these steps in order to build your Idle Game.
Included Scripts
Idle Income Generator
Passive income system for idle/clicker games with offline earnings calculation, upgrade scaling, ...
public double IncomePerSecond => CalculateIncome();
public static string FormatNumber(double number)
{
if (number >= 1e12) return (number / 1e12).ToString("F1") + "T";Score Manager
Complete score management system with high score persistence, combo multipliers with decay, and s...
public static ScoreManager Instance { get; private set; }
public void AddScore(int points)
{
int earnedPoints = points * ComboMultiplier;Mobile Responsive UI Scaler
Dynamically adjusts UI scaling based on device aspect ratio, DPI, and orientation. Works with Uni...
[RequireComponent(typeof(CanvasScaler))]
public class MobileResponsiveScaler : MonoBehaviour
{
[SerializeField] private Vector2 referenceResolution = new Vector2(1080, 1920);
canvasScaler.matchWidthOrHeight = match;Tap Input Handler
Handles single tap, double tap, and long press gestures with configurable timing. Provides tap po...
public UnityEvent<Vector2> onSingleTap;
public UnityEvent<Vector2> onDoubleTap;
public UnityEvent<Vector2> onLongPress;Mobile Safe Area Handler
Automatically adjusts UI RectTransform to respect device safe areas on notched phones and tablets...
[RequireComponent(typeof(RectTransform))]
public class MobileSafeArea : MonoBehaviour
{
Rect safeArea = Screen.safeArea;
anchorMin.x /= Screen.width;Related Systems
Idle Game System
Core systems for idle/incremental games — passive income generation, offline earnings, upgrade progression, number formatting, and responsive mobile UI.