t1k:unity:mobile:notification-setup
| Field | Value |
|---|---|
| Module | mobile |
| Version | 3.65.6 |
| Effort | low |
| Tools | — |
Keywords: big picture, campaign assets, large icon, mobile notifications settings, notification icon, notification icons, notification image, notification sound file, setup notification, small icon
How to invoke
Section titled “How to invoke”/t1k:unity:mobile:notification-setupMobile Notification Setup: Icons, Sound, Big Picture
Section titled “Mobile Notification Setup: Icons, Sound, Big Picture”Two jobs every Unity game with local notifications has: the Android small and large icon registered in Mobile Notifications settings, and per-message media (a themed sound and a big picture) small enough to schedule reliably. Both are platform work: nothing here needs a game framework, a blueprint or a deep link.
Scripts: python3 .claude/skills/t1k-unity-mobile-notification-setup/scripts/<name> (exit 0 ok / 1 spec
violation / 2 usage; --json on every one). Every number lives in scripts/notification_spec.py.
Scope: the pixel, importer and budget numbers are verified against Unity’s Mobile Notifications package; the game-side wiring is not. A capability missing here is not proof it is absent: grep source (state the scope) before concluding.
Packages/and any submodule are read-only (reproducible-on-every-machine-unity.md).
Decision Tree
Section titled “Decision Tree”| Intent | Read |
|---|---|
| Set up notification icons (small + large, Read/Write) | references/icons-and-settings.md + steps 1-5 |
| Themed sound and picture on every message | references/campaign-assets.md |
| Write the picture prompt, judge whether a picture is eye-catching | references/picture-prompt.md + notification_assets.py preview |
| Shrink a sound or picture to the budget | notification_assets.py sound-fit / image-fit |
| Check everything without Unity | check_notifications.py <settings asset, CSV, or dir> |
| Prove it works / run in a new game | references/verification.md |
| The game uses the UITemplate LiveOps notification module | optional section below + references/assets-and-formats.md |
Setup once per project: the two icons
Section titled “Setup once per project: the two icons”Detail, sources and the manual fallback: references/icons-and-settings.md.
- Small icon.
notification_icons.py small --src <png>(or--motif star|heart|circle|diamond): 48 px, white RGB on transparent, shape in the alpha channel. LOOK at it at 48 px before accepting. - Large icon.
notification_icons.py large: clones the game’s app icon to 192 px (no upscaling). - Enable Read/Write (and Non-Power-of-2 None) on both icon PNGs. Without it Unity skips the icon with only a console warning and the notification shows the default icon.
- Register
icon_0(Small) /icon_1(Large): copyscripts/NotificationIconSetup.cstoAssets/Editor/and runTools/Notifications/Apply Icons(it also does step 3), or add both entries by hand in Project Settings > Mobile Notifications. - Check:
check_notifications.py ProjectSettings/NotificationsSettings.asset.
A service that reads other drawable ids keeps the same pixels and importer keys: change the ids in
notification_spec.py and in the applier template together.
Sound and picture per message
Section titled “Sound and picture per message”Every notification that carries media gets a themed sound AND a big picture, fit to the budget:
references/campaign-assets.md walks theme brief -> concept -> sourcing -> fit -> provenance. Smoke ONE
message first: generate its two assets, show them, ask before doing the rest.
notification_assets.py sound-fit --src raw.mp3 --out <sounds dir>/notif_miss.wavnotification_assets.py image-fit --src raw.png --out <images dir>/notif_big_miss.jpgnotification_assets.py preview --src a.png --src b.png --out sheet.png # judge at phone-shade sizeBudget: sound .wav PCM16 mono 22050 Hz, target 1.5 s, FAIL above 2.0 s or 100000 bytes; picture 2:1
JPEG 900 px wide, target 80000 bytes, FAIL above 150000 bytes or 1280 px wide.
Optional: the UITemplate LiveOps notification module
Section titled “Optional: the UITemplate LiveOps notification module”Only if the game uses that module (a campaign CSV, Addressables blueprint, deep-linked taps). It changes
WHERE the media live, not the specs: sound files go to Assets/NotificationSounds/, pictures to
Assets/StreamingAssets/Notifications/, and each campaign’s FIRST CSV row names them in Sound /
LargeIcon / BigPicture / DeepLink. Placement table, column rules and the validator behaviour:
references/assets-and-formats.md. The checker reads that CSV with no extra arguments.
Blueprint semantics, CSV columns, tap routing (IDeeplinkHandler, scheme = Application.identifier) and
the framework’s own validator are owned by t1k-unity-tof-notification-campaigns; do not restate them here.
Hard rules
Section titled “Hard rules”- Icon ids are
icon_0/icon_1unless the game’s notification service reads others; never invent a third drawable. Never hand-editNotificationsSettings.asset: use the applier or the settings window. - 48 and 192 are not powers of two, and the default import policy (
nPOTScale: 1) would import 64 and 256, so Non-Power-of-2Noneis required, not cosmetic. A Small icon’s RGB is forced to white: a colour or opaque PNG becomes a solid white square. - Every file in a shipped sound or image folder ships, referenced or not. Provenance sidecars and source
masters go in
art/notification-sources/, never in a shipped folder. - Never “Reimport All”, never kill or restart the Editor, run headless
(
unity-headless-by-default.md,unity-forbidden-operations.md). - Do not commit Unity side effects:
Packages/packages-lock.jsonand*.slnxchange on a Unity run and are not part of a notification change; stage only the files you meant to touch. unverifiednever counts as pass: a sound or picture on a device is the only proof they work.
Related
Section titled “Related”t1k-unity-tof-notification-campaigns (UITemplate LiveOps blueprint, campaign CSV, tap routing) ·
t1k-unity-base-addressables (sprite/audio groups) · t1k-unity-mobile-core (Android/iOS build settings) ·
t1k-art-base-asset-provenance (sidecar schema) · t1k-ual (studio asset catalogue, read-only) ·
t1k-art-base-style-guide (theme brief input) · t1k-art-audio-artist (sound generation).