---
name: unity-game-builder
description: "Unity 6 patterns — DOTS/ECS, Addressables, Input System, URP, Cinemachine, mobile optimization. Production Unity 6 (and 2023 LTS): DOTS/ECS for performance, Addressables for content delivery, new Input System, Universal Render Pipeline (URP) optimization for mobile, Cinemachine cameras, and the build pipeline for iOS + Android + Steam."
license: MIT
---

# Unity Game Builder

Production-grade Unity 6 (and 2023 LTS) guidance for shipping real games, not prototypes. This skill knows the modern stack — DOTS/ECS, Addressables, the new Input System, URP, and Cinemachine — and the platform quirks of building for iOS, Android, and Steam. It's aimed at C# developers who already know Unity basics but want correct, performant patterns instead of tutorial-grade `Update()` spaghetti.

## When to use it

- You're profiling a scene that drops below 60 FPS on a mid-tier Android phone and need to move hot logic into Burst-compiled jobs or ECS systems.
- You're replacing `Resources.Load` with Addressables and need correct group layout, label-based loading, and a Remote Content CDN pipeline.
- You're wiring `PlayerInput` / Input Actions and want a clean action-map setup that survives gamepad + touch + keyboard.
- You're tuning URP for mobile (Forward vs Forward+, MSAA, render scale) or chasing a build that won't pass App Store / Play Console review.

## How it works

The skill applies concrete APIs and project conventions:

- **DOTS/ECS**: `IComponentData`, `ISystem` with `[BurstCompile]`, `SystemAPI.Query`, `IJobEntity`, and `EntityCommandBuffer` for structural changes. Knows the `Entities`, `Burst`, and `Collections` packages and when *not* to use ECS (small entity counts, heavy GameObject interop).
- **Addressables**: `AddressableAssetSettings` groups, `Addressables.LoadAssetAsync<T>`, `LoadSceneAsync`, release with `Addressables.Release`, and `addressables_content_state.bin` for content updates.
- **Input System**: `.inputactions` assets, generated C# wrappers, and the `PlayerInput` component with action callbacks.
- **URP**: the `UniversalRenderPipelineAsset`, Renderer Features, and quality tiers per platform.
- **Cinemachine**: `CinemachineCamera` (CM3), virtual camera blends, and `CinemachineBrain`.
- **Build pipeline**: `BuildPipeline.BuildPlayer` / batchmode CI, IL2CPP, and per-platform `PlayerSettings`.

## Example

```csharp
[BurstCompile]
public partial struct MoveSystem : ISystem
{
    public void OnUpdate(ref SystemState state)
    {
        float dt = SystemAPI.Time.DeltaTime;
        foreach (var (xf, vel) in
                 SystemAPI.Query<RefRW<LocalTransform>, RefRO<Velocity>>())
            xf.ValueRW.Position += vel.ValueRO.Value * dt;
    }
}
```

CI build, no editor UI:

```bash
Unity -batchmode -quit -projectPath . \
  -executeMethod BuildScript.PerformAndroidBuild -logFile -
```

## Tips & gotchas

- Burst won't compile managed types or `try/catch` — keep job code to blittable structs and `NativeArray`/`NativeList`.
- Structural changes (add/remove components, instantiate) inside a query throw; defer them through an `EntityCommandBuffer`.
- IL2CPP strips unused code — guard reflection/JSON types with a `link.xml` or `[Preserve]`.
- On URP mobile, default MSAA + HDR can double bandwidth; disable HDR unless you actually need it.

## FAQ

**Do I have to convert my whole project to ECS?** No. Hybrid is normal — push only the high-count, perf-critical systems (crowds, projectiles, simulation) to ECS and keep UI and gameplay glue as GameObjects.

**Does this cover iOS signing?** It covers the Unity-side export and `PlayerSettings`; the generated Xcode project still needs your provisioning profile and signing in Xcode or Fastlane.

**Unity 6 or 2023 LTS?** Both. Patterns target Unity 6, with notes where 2023 LTS API names differ (e.g. Cinemachine 2 vs 3 component names).
