/unity-dev:unity-device-testingfrom unity-dev
Guides systematic testing of Unity builds on real Android/iOS devices, distinguishing hardware issues from app bugs with probe, driver, and evidence patterns.
Ships in unity-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A device run has three parties: the app, the driver (your script), and usually a human who plugs, unplugs, waves or taps. Any of the three can be the thing that failed, and only one of them is the thing you were testing.
"It didn't work on the phone." Says nothing yet. The screen may have been off, the old build may still be installed, another app may hold the hardware, adb may have dropped, or the human did a different thing from the one you asked for. Every one of those produces the same symptom as a real bug.
So the rule is the one unity-debug applies to the editor, moved to hardware: check the
instrument first, and make the run say which of the three parties failed.
| The report | Go to |
|---|---|
| "test it on the phone", an acceptance run on real hardware | The four parts, then Pre-flight |
| "unplug / replug / background it and check" | reference/human-in-the-loop.md, reference/android-driver.md |
| "the screenshot is black", "adb lost the device" | Pre-flight |
| "how do I read logs from an iPhone" | Two platforms, two log channels, reference/ios-driver.md |
| "passes once, fails the next run", "compare two devices" | reference/verdicts-and-evidence.md |
| Stutters on device but runs fine in the editor | Confirm it on the device here (probe diag lines), then measure the frame-time window with unity-profiling |
| Part | Done when |
|---|---|
| Probe | A scene in the project logs [Probe] state A -> B, [Probe] <event> … and one [Probe] diag k=v … line per second, and shows the same on screen — reference/device-probe.md |
| Driver | A script installs the artifact, launches it, and waits on those lines with a timeout per step; exits 0 all green, 2 a step failed, 3 the harness failed — reference/android-driver.md · reference/ios-driver.md |
| Human protocol | Each physical action is one instruction, armed before it is asked for, and detected from the device, never taken on the human's word — reference/human-in-the-loop.md |
| Evidence | Every verdict quotes the log lines and their timestamps; every surprise gets a control run before it gets a theory — reference/verdicts-and-evidence.md |
Run these before the first step of every run. Each is one command; each has cost a full round trip to someone who skipped it.
| Check | Android | iOS |
|---|---|---|
| The device is reachable now | adb -s <serial> get-state in a retry loop — a headless Unity build restarts the adb server and a Wi-Fi device vanishes for 10–30 s | xcrun devicectl list devices → State must be connected/available, not unavailable (locked, off-network, or never paired) |
| The screen is on | input keyevent KEYCODE_WAKEUP, wm dismiss-keyguard, then dumpsys power | grep mWakefulness=Awake. A black screenshot with mWakefulness=Dozing is not an app bug | Ask the human; there is no query. The console shows applicationWillResignActive when the screen locks |
| It is your build | dumpsys package <pkg> | grep lastUpdateTime against the artifact's mtime; install with -r -g every run | Reinstall every run; devicectl device install app prints the bundle id it replaced |
| Nothing else holds the hardware | am force-stop every other app that uses the same hardware (camera, Bluetooth, sensors) — a backgrounded app keeps its native handle | Same idea: terminate the previous instance with --terminate-existing |
| The thing a human will change is in the state you think | Read a present-tense source — dumpsys battery | grep 'powered: true' for a charger, settings get … for a toggle — never a dump that also lists history | The probe lists inputs at start; assert on that line |
| Android | iOS | |
|---|---|---|
| Logs | adb logcat -c then poll logcat -d — never a long-lived logcat, it dies with the adb server | devicectl device process launch --console redirected to a file; that file is the log. Unity Debug.Log and native NSLog both land in it |
| Screenshots | adb exec-out screencap -p | None from the CLI. The probe's log line is the readout — design it so a screenshot is never needed |
| Tap a system dialog | Detect it by focus (dumpsys window | grep mCurrentFocus), tap by coordinates — and wm size is the physical portrait size in every rotation (reference/android-driver.md) | Impossible. A system sheet shows as applicationWillResignActive right after launch; the human taps it |
| Pull a file the app wrote | adb pull /sdcard/Android/data/<pkg>/files/… | devicectl device copy from --domain-type appDataContainer … |
| Release builds strip logs | R8 -assumenosideeffects removes Log.* from an .aar; keep i/w/e or your tags never appear | — |
| The situation | Read |
|---|---|
| Writing the scene that makes a device run readable; what a log line must carry; mode buttons; dumping raw data to a file | reference/device-probe.md |
| adb over Wi-Fi, waking the screen, polling logcat, tapping permission dialogs, rotation, detecting physical unplug, pulling files | reference/android-driver.md |
| Reading an iPhone from a terminal: devicectl states, the console as the only log, system sheets, pulling files, relaunching | reference/ios-driver.md |
| A step needs a person: what to ask, in what order, how to verify they did it, how to batch | reference/human-in-the-loop.md |
| A run surprised you; one device counts and the other does not; deciding between "bug", "harness" and "protocol" | reference/verdicts-and-evidence.md |
| Building and signing the APK/AAB you are about to install | unity-android-release |
| Getting a Unity project onto an iPhone at all: Xcode project, signing, install, console | unity-ios-build |
| The probe idea in the editor: one-line snapshots, situations, journeys | unity-play-harness |
| Whether a results file or an exit code can be believed; PlayMode runs | unity-debug |
| Frame time on the device | unity-profiling |
| File | Where it goes |
|---|---|
templates/DeviceProbe.cs | Assets/ of a dev/host project, on one GameObject in a DeviceProbe scene. Rename the tag and fill the three marked hooks |
templates/device-acceptance.sh | Tools/. Android driver: pre-flight, install, steps, dialog tapper, --wait for unattended physical steps |
templates/ios-acceptance.sh | Tools/. iOS driver over a console log file: launch, wait on lines, prompt or --wait, pull files |
Tools/device-acceptance.sh -s <serial> --apk Builds/probe.apk # interactive: press Enter after each physical step
Tools/device-acceptance.sh -s <serial> --apk Builds/probe.apk --wait # unattended: watches the device for the physical change
Tools/ios-acceptance.sh --device <udid> --bundle com.example.probe --wait
screen_off_timeout, force-stop the probe, and
say which steps were not run.The skills named in Load what the situation needs own their parts: building and signing the
Android artifact (unity-android-release), getting onto an iPhone at all (unity-ios-build),
probes and journeys inside the editor (unity-play-harness), trusting a results file or an exit
code (unity-debug), and frame-time windows on the device (unity-profiling). Device farms,
cloud labs and store review testing are not covered — this is one phone on your desk.
reference/android-driver.md (opens in a new tab)reference/device-probe.md (opens in a new tab)reference/human-in-the-loop.md (opens in a new tab)reference/ios-driver.md (opens in a new tab)reference/verdicts-and-evidence.md (opens in a new tab)templates/DeviceProbe.cs (opens in a new tab)templates/device-acceptance.sh (opens in a new tab)templates/ios-acceptance.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
unity, mobile-testing, android-testing, ios-testing, device-testing
npx claudepluginhub tipoli5890/game-studio --plugin unity-dev51 skills in this plugin
/unity-2d-animationSkeletal 2D characters: PSB rig, bones and weights, sprite swaps, 2D IK (2D Animation package)./unity-2d-controllerMove a 2D character: platformer jump, slopes, coyote time, moving platforms, top-down movement./unity-2d-gridGrid tactics and tile puzzles, hex or square: move range, A* paths, line of sight, turns, undo./unity-2d-level2D level layout as data: Tiled/LDtk import, rooms, endless chunks, seeded levels, jump reachability.