Skip to content
Development
Skill

/mobile

Mobile optimization — tile-based GPU, ASTC textures, draw call budget (<100), thermal throttling, battery, touch input, safe areas, App Store guidelines.

From plugin
everything-claude-unity
2442 skills20 agents27 commands
Install
$ npx -y skills add XeldarAlz/everything-claude-unity --skill mobile --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/mobile

Context preview

The summary Claude sees to decide when to auto-load this skill.

Mobile optimization — tile-based GPU, ASTC textures, draw call budget (<100), thermal throttling, battery, touch input, safe areas, App Store guidelines.

SKILL.md

mobile.SKILL.md
name: mobile
description: "Mobile optimization — tile-based GPU, ASTC textures, draw call budget (<100), thermal throttling, battery, touch input, safe areas, App Store guidelines."
alwaysApply: true
globs: ["**/*.cs"]

Mobile Optimization

GPU Architecture

Mobile GPUs use **tile-based rendering** (TBDR). Key implications:

  • Overdraw is expensive — minimize transparent layers
  • Alpha-tested geometry is costly (breaks early-Z)
  • Keep fragment shader complexity low
  • Avoid full-screen post-processing when possible

Performance Budgets

| Metric | Low-End | Mid-Range | High-End | |--------|---------|-----------|----------| | Draw calls | < 50 | < 100 | < 200 | | Triangles | < 50k | < 100k | < 200k | | Frame time | 33ms (30fps) | 16.6ms (60fps) | 16.6ms | | Texture memory | < 100MB | < 150MB | < 256MB | | Total memory | < 300MB | < 500MB | < 800MB | | Build size | < 100MB | < 200MB | < 500MB |

Texture Compression

  • **ASTC** — use on both iOS and Android (best quality/size ratio)
  • Max sizes: 512 for UI elements, 1024 for props, 2048 for hero characters
  • Enable mipmaps for 3D objects, disable for UI sprites
  • Use texture atlases to reduce draw calls

Draw Call Reduction

1. **SRP Batcher** — enabled by default in URP, ensure shader compatibility 2. **GPU Instancing** — for repeated objects (trees, rocks, enemies) 3. **Static Batching** — for non-moving environment 4. **Texture Atlasing** — combine sprite sheets 5. **Material sharing** — same material = same batch

Shader Complexity

  • Limit math operations per fragment
  • Avoid dependent texture reads
  • Use `half` precision where possible (color, UV, normals)
  • No real-time shadows on low-end (baked only)
  • Avoid post-processing stack on low-end (or use simpler alternatives)

Thermal Throttling

// Adaptive Performance package
using UnityEngine.AdaptivePerformance;

private void Update()
{
    IAdaptivePerformance ap = Holder.Instance;
    if (ap != null && ap.ThermalStatus.ThermalMetrics.WarningLevel > WarningLevel.NoWarning)
    {
        // Reduce quality: lower resolution, reduce particles, cap framerate
        QualitySettings.resolutionScalingFixedDPIFactor = 0.75f;
    }
}
  • Target 30fps for casual games (saves battery)
  • Offer 60fps as opt-in option
  • Reduce GPU load when battery < 20%
  • Monitor thermal state and downscale dynamically

Touch Input

// Input System touch
[SerializeField] private float _swipeThreshold = 50f;

// Minimum tap target: 44x44 points (Apple HIG)
// Minimum tap target: 48x48 dp (Material Design)
  • Tap: primary touch press+release < 0.3s
  • Swipe: delta > threshold in one direction
  • Pinch: two-finger distance change
  • Long press: hold > 0.5s
  • Drag: press + move

Safe Area

private void ApplySafeArea()
{
    Rect safeArea = Screen.safeArea;
    Vector2 anchorMin = safeArea.position;
    Vector2 anchorMax = safeArea.position + safeArea.size;

    anchorMin.x /= Screen.width;
    anchorMin.y /= Screen.height;
    anchorMax.x /= Screen.width;
    anchorMax.y /= Screen.height;

    RectTransform rect = GetComponent<RectTransform>();
    rect.anchorMin = anchorMin;
    rect.anchorMax = anchorMax;
}

Apply to the root UI panel to respect notches and rounded corners.

Audio Compression

| Type | Format | Quality | Load Type | |------|--------|---------|-----------| | Music | Vorbis | 40-60% | Streaming | | SFX (short) | ADPCM | — | Decompress On Load | | SFX (long) | Vorbis | 70% | Compressed In Memory | | UI clicks | PCM | — | Decompress On Load |

Build Size

  • Strip unused code (IL2CPP stripping: High)
  • Compress textures aggressively
  • Use Addressables for optional/DLC content
  • Remove unused packages from manifest
  • Target < 100MB for initial download (App Store recommendation)
Read more
Ships witheverything-claude-unity

The ultimate Claude Code toolkit for Unity game development. A production-ready, plug-and-play system that gives Claude Code deep Unity expertise — from writing performant C# to building scenes, profiling performance, and triggering iOS/Android builds — all

Get the whole plugin

Other skills on everything-claude-unity.