HOW WE BUILD MOBILE GAMES WITH UNITY: COMPLETE INDIE WORKFLOW

Unity Indie Game Development Pipeline

Building commercial-quality mobile games as an independent studio requires clean engineering, robust project architecture, and relentless optimization. Here is an inside look at the exact Unity and C# workflow we use at Khawajja Games to build titles like Operation Black Sky.

1. Modular Multi-Scene Architecture

Monolithic scenes lead to merge conflicts, slow loading times, and memory bloat. Instead, we divide every game into a multi-scene additive hierarchy:

  • Persistent Core Scene: Contains audio managers, save-state serialization, input dispatchers, and global event buses. Loaded additively once at startup and never unloaded.
  • UI Overlay Scene: Houses HUD reticles, pause menus, virtual thumbsticks, and telemetry indicators.
  • Environment & Gameplay Scenes: Loaded asynchronously in the background while players review mission briefings, allowing zero frame hitching between levels.

2. Prefab Variants & Nested Component Design

To maintain scalable weapon and vehicle rosters, we utilize Unity's Prefab Variant workflow.

A base AircraftBase prefab holds common components like the flight computer, damage receiver, and audio source. Specific attack helicopters and stealth fighter jets inherit from this base prefab, overriding only their mesh visual models, flight aerodynamic constants, and weapon hardpoint positions.

If you ever experience issues with unapplied overrides or broken links in Unity, refer to our troubleshooting guide on Fixing Unity Prefab Changes Not Saving.

3. Clean C# Architecture & Event-Driven Decoupling

Direct references between GameObjects create spaghetti code that easily triggers NullReferenceExceptions. We decouple our systems using lightweight C# events:

C# DECOUPLED EVENT PATTERN
public class AircraftHealth : MonoBehaviour
{
    public static event System.Action<float, float> OnHealthChanged; // current, max
    public static event System.Action OnAircraftDestroyed;

    [SerializeField] private float maxHealth = 100f;
    private float currentHealth;

    public void TakeDamage(float amount)
    {
        currentHealth = Mathf.Max(0f, currentHealth - amount);
        OnHealthChanged?.Invoke(currentHealth, maxHealth);

        if (currentHealth <= 0f)
        {
            OnAircraftDestroyed?.Invoke();
        }
    }
}

With this pattern, the HUD health bar listens to AircraftHealth.OnHealthChanged without the health script needing any reference to UI elements.

4. Mobile Input: New Input System & Virtual Sticks

We build all mobile touch controls on top of the Unity Input System Package using Dual On-Screen Joysticks. This enables seamless cross-platform input where keyboard and gamepad bindings run in parallel with touch sticks for instantaneous desktop testing.

Learn how to set up this exact input pipeline in our step-by-step tutorial: Unity New Input System & Virtual Joysticks Guide.

5. Physics Tuning in FixedUpdate

Rigidbodies must always be manipulated using forces and torque inside FixedUpdate. Direct modifications to transform.position bypass collision detection and cause high-speed aircraft to clip through mountains and enemy hulls.

To calibrate aircraft velocities and projectile drop physics, we test flight parameters using our browser-based Player Speed Calculator and Projectile Calculator before compiling builds.

6. Android Build Profiling & Testing

Testing in the Unity Editor is not sufficient for mobile development. We profile directly on physical Android test hardware using the Unity Profiler over Wi-Fi/ADB. Key metrics we monitor:

  • CPU Main Thread Duration: Must stay under 10ms per frame.
  • GC Allocations: 0 KB per frame during active combat.
  • Draw Calls / Batches: Under 120 draw calls per frame on mobile URP.

7. Summary

Indie game development is about discipline, smart architecture, and continuous iteration. By combining modular scenes, decoupled event patterns, and strict profiling routines, small studios can build high-performance mobile games that compete on visual quality and fluid gameplay.

EXPLORE OUR DEVELOPER TOOLS

Speed up your Unity game development with our free suite of browser-based game math and physics calculators.

VIEW ALL DEVELOPER TOOLS (8)

RELATED RESOURCES