nccgs 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/.claude/agents/nccgs-accessibility-specialist.md +26 -0
  2. package/.claude/agents/nccgs-adversarial-reviewer.md +26 -0
  3. package/.claude/agents/nccgs-ai-programmer.md +26 -0
  4. package/.claude/agents/nccgs-analytics-engineer.md +26 -0
  5. package/.claude/agents/nccgs-art-direction-lead.md +26 -0
  6. package/.claude/agents/nccgs-audio-direction-lead.md +26 -0
  7. package/.claude/agents/nccgs-creative-director.md +26 -0
  8. package/.claude/agents/nccgs-documentation-manager.md +26 -0
  9. package/.claude/agents/nccgs-economy-designer.md +26 -0
  10. package/.claude/agents/nccgs-engine-programmer.md +26 -0
  11. package/.claude/agents/nccgs-game-design-lead.md +26 -0
  12. package/.claude/agents/nccgs-game-designer.md +26 -0
  13. package/.claude/agents/nccgs-gameplay-programmer.md +26 -0
  14. package/.claude/agents/nccgs-level-designer.md +26 -0
  15. package/.claude/agents/nccgs-live-ops-designer.md +26 -0
  16. package/.claude/agents/nccgs-localization-lead.md +26 -0
  17. package/.claude/agents/nccgs-narrative-lead.md +26 -0
  18. package/.claude/agents/nccgs-network-programmer.md +26 -0
  19. package/.claude/agents/nccgs-performance-analyst.md +26 -0
  20. package/.claude/agents/nccgs-producer.md +26 -0
  21. package/.claude/agents/nccgs-production-coordinator.md +23 -0
  22. package/.claude/agents/nccgs-programming-lead.md +26 -0
  23. package/.claude/agents/nccgs-prototyper.md +26 -0
  24. package/.claude/agents/nccgs-qa-engineer.md +26 -0
  25. package/.claude/agents/nccgs-qa-lead.md +26 -0
  26. package/.claude/agents/nccgs-release-engineer.md +26 -0
  27. package/.claude/agents/nccgs-release-lead.md +26 -0
  28. package/.claude/agents/nccgs-security-engineer.md +26 -0
  29. package/.claude/agents/nccgs-sound-designer.md +26 -0
  30. package/.claude/agents/nccgs-systems-designer.md +26 -0
  31. package/.claude/agents/nccgs-technical-architect.md +26 -0
  32. package/.claude/agents/nccgs-technical-artist.md +26 -0
  33. package/.claude/agents/nccgs-technical-director.md +26 -0
  34. package/.claude/agents/nccgs-tools-programmer.md +26 -0
  35. package/.claude/agents/nccgs-ui-programmer.md +26 -0
  36. package/.claude/agents/nccgs-unity-build-specialist.md +26 -0
  37. package/.claude/agents/nccgs-unity-content-specialist.md +26 -0
  38. package/.claude/agents/nccgs-unity-implementer.md +26 -0
  39. package/.claude/agents/nccgs-unity-rendering-specialist.md +26 -0
  40. package/.claude/agents/nccgs-unity-systems-specialist.md +26 -0
  41. package/.claude/agents/nccgs-unity-ui-specialist.md +26 -0
  42. package/.claude/agents/nccgs-ux-designer.md +26 -0
  43. package/.claude/agents/nccgs-verification-engineer.md +26 -0
  44. package/.claude/agents/nccgs-world-builder.md +26 -0
  45. package/.claude/agents/nccgs-writer.md +26 -0
  46. package/.claude/nccgs/THIRD_PARTY_NOTICES.md +13 -0
  47. package/.claude/nccgs/VERSION +1 -0
  48. package/.claude/nccgs/constitution.md +131 -0
  49. package/.claude/nccgs/hooks/agent-audit.mjs +10 -0
  50. package/.claude/nccgs/hooks/common.mjs +41 -0
  51. package/.claude/nccgs/hooks/post-compact.mjs +1 -0
  52. package/.claude/nccgs/hooks/pre-compact.mjs +8 -0
  53. package/.claude/nccgs/hooks/protect-git.mjs +22 -0
  54. package/.claude/nccgs/hooks/protect-write.mjs +17 -0
  55. package/.claude/nccgs/hooks/session-start.mjs +15 -0
  56. package/.claude/nccgs/hooks/session-stop.mjs +7 -0
  57. package/.claude/nccgs/protocols/agent-contract.md +34 -0
  58. package/.claude/nccgs/protocols/context-packets.md +13 -0
  59. package/.claude/nccgs/protocols/evidence.md +15 -0
  60. package/.claude/nccgs/protocols/model-routing.md +22 -0
  61. package/.claude/nccgs/protocols/orchestration.md +26 -0
  62. package/.claude/nccgs/protocols/unity-boundary.md +11 -0
  63. package/.claude/nccgs/settings.fragment.json +77 -0
  64. package/.claude/nccgs/studio.json +347 -0
  65. package/.claude/nccgs/tools/configure-models.mjs +39 -0
  66. package/.claude/nccgs/unity-skills-manifest.json +727 -0
  67. package/.claude/nccgs/workflow-catalog.json +317 -0
  68. package/.claude/rules/nccgs-canonical-docs.md +19 -0
  69. package/.claude/rules/nccgs-editor-tools.md +12 -0
  70. package/.claude/rules/nccgs-localization.md +12 -0
  71. package/.claude/rules/nccgs-networking.md +13 -0
  72. package/.claude/rules/nccgs-performance.md +14 -0
  73. package/.claude/rules/nccgs-rendering.md +16 -0
  74. package/.claude/rules/nccgs-security.md +13 -0
  75. package/.claude/rules/nccgs-tests.md +18 -0
  76. package/.claude/rules/nccgs-ui.md +14 -0
  77. package/.claude/rules/nccgs-unity-assets.md +21 -0
  78. package/.claude/rules/nccgs-unity-code.md +22 -0
  79. package/.claude/skills/accessibility-review/SKILL.md +14 -0
  80. package/.claude/skills/architecture-decision/SKILL.md +14 -0
  81. package/.claude/skills/asset-audit/SKILL.md +14 -0
  82. package/.claude/skills/audit/SKILL.md +16 -0
  83. package/.claude/skills/audit/references/dimensions.md +46 -0
  84. package/.claude/skills/balance-review/SKILL.md +14 -0
  85. package/.claude/skills/bug-triage/SKILL.md +14 -0
  86. package/.claude/skills/build-live-game/SKILL.md +317 -0
  87. package/.claude/skills/build-live-game/references/achievements.md +779 -0
  88. package/.claude/skills/build-live-game/references/apis.md +280 -0
  89. package/.claude/skills/build-live-game/references/authentication.md +437 -0
  90. package/.claude/skills/build-live-game/references/battlepass.md +860 -0
  91. package/.claude/skills/build-live-game/references/cloud-code.md +563 -0
  92. package/.claude/skills/build-live-game/references/cloud-save.md +474 -0
  93. package/.claude/skills/build-live-game/references/deployment.md +216 -0
  94. package/.claude/skills/build-live-game/references/player-account.md +813 -0
  95. package/.claude/skills/build-live-game/references/remote-config.md +96 -0
  96. package/.claude/skills/build-live-game/references/tooling.md +431 -0
  97. package/.claude/skills/closure/SKILL.md +14 -0
  98. package/.claude/skills/code-review/SKILL.md +14 -0
  99. package/.claude/skills/compatibility-review/SKILL.md +14 -0
  100. package/.claude/skills/context-pack/SKILL.md +14 -0
  101. package/.claude/skills/dependency-review/SKILL.md +14 -0
  102. package/.claude/skills/design/SKILL.md +20 -0
  103. package/.claude/skills/design-review/SKILL.md +14 -0
  104. package/.claude/skills/evidence-review/SKILL.md +14 -0
  105. package/.claude/skills/hotfix/SKILL.md +14 -0
  106. package/.claude/skills/implement-in-app-purchases/README.md +233 -0
  107. package/.claude/skills/implement-in-app-purchases/SKILL.md +158 -0
  108. package/.claude/skills/implement-in-app-purchases/references/api-notes.md +562 -0
  109. package/.claude/skills/implement-in-app-purchases/references/codeless-catalog.md +331 -0
  110. package/.claude/skills/implement-in-app-purchases/references/convert-adapty.md +268 -0
  111. package/.claude/skills/implement-in-app-purchases/references/convert-essentialkit.md +239 -0
  112. package/.claude/skills/implement-in-app-purchases/references/convert-revenuecat.md +275 -0
  113. package/.claude/skills/implement-in-app-purchases/references/convert-unipay.md +145 -0
  114. package/.claude/skills/implement-in-app-purchases/references/migration-v4-to-v5.md +204 -0
  115. package/.claude/skills/implement-in-app-purchases/references/path-add-iap-to-new-project.md +198 -0
  116. package/.claude/skills/implement-in-app-purchases/references/path-convert-native-google-billing.md +356 -0
  117. package/.claude/skills/implement-in-app-purchases/references/path-convert-native-storekit.md +446 -0
  118. package/.claude/skills/implement-in-app-purchases/references/path-implement-iap-d2c.md +680 -0
  119. package/.claude/skills/implement-in-app-purchases/references/platform-notes.md +204 -0
  120. package/.claude/skills/implement-in-app-purchases/references/pre-check.md +205 -0
  121. package/.claude/skills/incident-recovery/SKILL.md +14 -0
  122. package/.claude/skills/initialize-ai-navigation/SKILL.md +95 -0
  123. package/.claude/skills/initialize-ai-navigation/references/navigation-system.md +794 -0
  124. package/.claude/skills/levelplay-unity-integration/CHANGELOG.md +57 -0
  125. package/.claude/skills/levelplay-unity-integration/README.md +74 -0
  126. package/.claude/skills/levelplay-unity-integration/SKILL.md +1126 -0
  127. package/.claude/skills/levelplay-unity-integration/references/banner-api.md +920 -0
  128. package/.claude/skills/levelplay-unity-integration/references/best-practices.md +536 -0
  129. package/.claude/skills/levelplay-unity-integration/references/ilrd-api.md +337 -0
  130. package/.claude/skills/levelplay-unity-integration/references/initialization-api.md +630 -0
  131. package/.claude/skills/levelplay-unity-integration/references/interstitial-api.md +899 -0
  132. package/.claude/skills/levelplay-unity-integration/references/ios-setup.md +491 -0
  133. package/.claude/skills/levelplay-unity-integration/references/migration-sdk-9.md +666 -0
  134. package/.claude/skills/levelplay-unity-integration/references/privacy-settings.md +608 -0
  135. package/.claude/skills/levelplay-unity-integration/references/rewarded-api.md +902 -0
  136. package/.claude/skills/localization/SKILL.md +135 -0
  137. package/.claude/skills/localization/references/api-notes.md +76 -0
  138. package/.claude/skills/localization/resources/L10nBatchProcessor.cs +69 -0
  139. package/.claude/skills/localization/resources/LocalizedFontAsset.cs +18 -0
  140. package/.claude/skills/localize-game/SKILL.md +14 -0
  141. package/.claude/skills/migrate-project/SKILL.md +21 -0
  142. package/.claude/skills/migrate-project/references/procedure.md +63 -0
  143. package/.claude/skills/milestone-review/SKILL.md +14 -0
  144. package/.claude/skills/new-unity-project/SKILL.md +179 -0
  145. package/.claude/skills/optimize-audio/SKILL.md +199 -0
  146. package/.claude/skills/optimize-audio/resources/audio-import-api.md +146 -0
  147. package/.claude/skills/optimize-audio/resources/platform-settings.md +48 -0
  148. package/.claude/skills/optimize-text-mesh-pro/SKILL.md +182 -0
  149. package/.claude/skills/optimize-web/SKILL.md +393 -0
  150. package/.claude/skills/optimize-web/resources/WebOptimizer.cs +21 -0
  151. package/.claude/skills/optimize-web/resources/toktx-examples.sh +11 -0
  152. package/.claude/skills/performance-audit/SKILL.md +14 -0
  153. package/.claude/skills/physics-3d-collision/SKILL.md +442 -0
  154. package/.claude/skills/physics-3d-collision/references/troubleshooting.md +41 -0
  155. package/.claude/skills/physics-3d-collision/resources/CollisionDebugger.cs +33 -0
  156. package/.claude/skills/plan-feature/SKILL.md +14 -0
  157. package/.claude/skills/playtest/SKILL.md +14 -0
  158. package/.claude/skills/project-stage/SKILL.md +14 -0
  159. package/.claude/skills/prototype-feature/SKILL.md +14 -0
  160. package/.claude/skills/qa-plan/SKILL.md +14 -0
  161. package/.claude/skills/release/SKILL.md +18 -0
  162. package/.claude/skills/release-readiness/SKILL.md +14 -0
  163. package/.claude/skills/retrospective/SKILL.md +14 -0
  164. package/.claude/skills/review/SKILL.md +16 -0
  165. package/.claude/skills/security-audit/SKILL.md +14 -0
  166. package/.claude/skills/setup-multiplayer-services/SKILL.md +39 -0
  167. package/.claude/skills/setup-multiplayer-services/references/dgs-entrypoint.md +79 -0
  168. package/.claude/skills/setup-multiplayer-services/references/entrypoints.md +213 -0
  169. package/.claude/skills/setup-multiplayer-services/references/examples.md +33 -0
  170. package/.claude/skills/setup-multiplayer-services/references/implementation-fit.md +30 -0
  171. package/.claude/skills/setup-multiplayer-services/references/underlying-services.md +11 -0
  172. package/.claude/skills/setup-multiplayer-services/references/workflows-prerequisites.md +17 -0
  173. package/.claude/skills/setup-vivox-voice-chat/SKILL.md +118 -0
  174. package/.claude/skills/setup-vivox-voice-chat/evals/.env.example +6 -0
  175. package/.claude/skills/setup-vivox-voice-chat/evals/README.md +101 -0
  176. package/.claude/skills/setup-vivox-voice-chat/evals/promptfooconfig.yaml +32 -0
  177. package/.claude/skills/setup-vivox-voice-chat/evals/tests/init-and-login.yaml +76 -0
  178. package/.claude/skills/setup-vivox-voice-chat/evals/tests/text-chat.yaml +65 -0
  179. package/.claude/skills/setup-vivox-voice-chat/evals/tests/voice-channels.yaml +74 -0
  180. package/.claude/skills/setup-vivox-voice-chat/references/events-and-participants.md +79 -0
  181. package/.claude/skills/setup-vivox-voice-chat/references/init-and-login.md +92 -0
  182. package/.claude/skills/setup-vivox-voice-chat/references/text-chat.md +93 -0
  183. package/.claude/skills/setup-vivox-voice-chat/references/troubleshooting.md +47 -0
  184. package/.claude/skills/setup-vivox-voice-chat/references/voice-channels.md +90 -0
  185. package/.claude/skills/shader-graph-create-custom-node/SKILL.md +25 -0
  186. package/.claude/skills/shader-graph-create-custom-node/resources/all_hints.hlsl +182 -0
  187. package/.claude/skills/sprint-plan/SKILL.md +14 -0
  188. package/.claude/skills/sprite-editor/SKILL.md +66 -0
  189. package/.claude/skills/sprite-editor/references/api_reference.md +151 -0
  190. package/.claude/skills/sprite-editor/references/background.md +112 -0
  191. package/.claude/skills/sprite-editor/references/templates.md +72 -0
  192. package/.claude/skills/sprite-editor/scripts/AutomaticSliceTexture.cs +40 -0
  193. package/.claude/skills/sprite-editor/scripts/GenerateNewSpriteRects.cs +200 -0
  194. package/.claude/skills/sprite-editor/scripts/GetTextureSourceImageSize.cs +32 -0
  195. package/.claude/skills/sprite-editor/scripts/GetTextureToSlice.cs +55 -0
  196. package/.claude/skills/sprite-editor/scripts/GridSliceTexture.cs +40 -0
  197. package/.claude/skills/sprite-editor/scripts/IsometricSliceTexture.cs +141 -0
  198. package/.claude/skills/sprite-editor/scripts/README.md +134 -0
  199. package/.claude/skills/sprite-editor/scripts/SetPivotExample.cs +58 -0
  200. package/.claude/skills/sprite-editor/scripts/SpriteToPng.cs +88 -0
  201. package/.claude/skills/status/SKILL.md +16 -0
  202. package/.claude/skills/story-readiness/SKILL.md +14 -0
  203. package/.claude/skills/test/SKILL.md +16 -0
  204. package/.claude/skills/ui/SKILL.md +142 -0
  205. package/.claude/skills/ui-imgui/SKILL.md +186 -0
  206. package/.claude/skills/ui-imgui/references/gui-elements.md +156 -0
  207. package/.claude/skills/ui-imgui/references/templates.md +141 -0
  208. package/.claude/skills/ui-review/SKILL.md +14 -0
  209. package/.claude/skills/ui-ugui/SKILL.md +282 -0
  210. package/.claude/skills/ui-ugui/references/scrollview-setup.md +29 -0
  211. package/.claude/skills/ui-uitk/SKILL.md +235 -0
  212. package/.claude/skills/ui-uitk/references/common-issues.md +74 -0
  213. package/.claude/skills/ui-uitk/references/custom-elements.md +241 -0
  214. package/.claude/skills/ui-uitk/references/painter2d.md +282 -0
  215. package/.claude/skills/ui-uitk/references/pointermanipulator-guide.md +94 -0
  216. package/.claude/skills/ui-uitk/references/svg-icons.md +136 -0
  217. package/.claude/skills/ui-uitk/references/ui-runtime-binding.md +234 -0
  218. package/.claude/skills/ui-uitk/references/uss-guide.md +138 -0
  219. package/.claude/skills/unity-cli/CHANGELOG.md +233 -0
  220. package/.claude/skills/unity-cli/SECURITY.md +22 -0
  221. package/.claude/skills/unity-cli/SKILL.md +414 -0
  222. package/.claude/skills/unity-cli/references/auth-license-cloud.md +146 -0
  223. package/.claude/skills/unity-cli/references/build-run-test.md +349 -0
  224. package/.claude/skills/unity-cli/references/collaboration.md +472 -0
  225. package/.claude/skills/unity-cli/references/config-hub.md +103 -0
  226. package/.claude/skills/unity-cli/references/diagnostics-maintenance.md +326 -0
  227. package/.claude/skills/unity-cli/references/editors-install.md +327 -0
  228. package/.claude/skills/unity-cli/references/integration-advanced.md +472 -0
  229. package/.claude/skills/unity-cli/references/projects-templates.md +574 -0
  230. package/.claude/skills/unity-package-management/SKILL.md +304 -0
  231. package/.claude/skills/unity-package-management/references/select-packages.md +108 -0
  232. package/.claude/skills/urp-postprocessing/SKILL.md +188 -0
  233. package/.claude/skills/urp-postprocessing/references/code-templates.md +119 -0
  234. package/.claude/skills/urp-postprocessing/references/effect-reference.md +86 -0
  235. package/.claude/skills/validate-urp-render-graph-renderer-feature/SKILL.md +269 -0
  236. package/.claude/skills/work/SKILL.md +36 -0
  237. package/.claude/skills/work/references/classification.md +41 -0
  238. package/.claude/skills/work/references/closure.md +50 -0
  239. package/.claude/skills/work/references/feature-contracts.md +32 -0
  240. package/.claude/skills/work/references/verification.md +26 -0
  241. package/CLAUDE.md +6 -0
  242. package/LICENSE +21 -0
  243. package/README.md +162 -0
  244. package/THIRD_PARTY_NOTICES.md +23 -0
  245. package/UPGRADING.md +32 -0
  246. package/VERSION +1 -0
  247. package/docs/ARCHITECTURE.md +73 -0
  248. package/docs/HUONG-DAN-MIGRATE-VA-SU-DUNG.md +324 -0
  249. package/docs/MIGRATION-MATRIX.md +23 -0
  250. package/docs/PROJECT-POLICY.md +67 -0
  251. package/docs/WORKFLOWS.md +61 -0
  252. package/package-assets/setup-vivox-voice-chat-evals.gitignore +7 -0
  253. package/package.json +41 -0
  254. package/scaffold/.nccgs/bugs/.gitkeep +1 -0
  255. package/scaffold/.nccgs/closures/.gitkeep +1 -0
  256. package/scaffold/.nccgs/context/.gitkeep +1 -0
  257. package/scaffold/.nccgs/decisions/.gitkeep +1 -0
  258. package/scaffold/.nccgs/evidence/.gitkeep +1 -0
  259. package/scaffold/.nccgs/features/.gitkeep +1 -0
  260. package/scaffold/.nccgs/migrations/.gitkeep +1 -0
  261. package/scaffold/.nccgs/playtests/.gitkeep +1 -0
  262. package/scaffold/.nccgs/project.yaml +103 -0
  263. package/scaffold/.nccgs/requirements.yaml +10 -0
  264. package/scaffold/.nccgs/reviews/.gitkeep +1 -0
  265. package/scaffold/.nccgs/state.md +40 -0
  266. package/scaffold/.nccgs/templates/agent-handoff.md +25 -0
  267. package/scaffold/.nccgs/templates/architecture-decision.md +27 -0
  268. package/scaffold/.nccgs/templates/closure-record.md +51 -0
  269. package/scaffold/.nccgs/templates/context-packet.yaml +17 -0
  270. package/scaffold/.nccgs/templates/evidence-record.md +23 -0
  271. package/scaffold/.nccgs/templates/feature-contract.md +35 -0
  272. package/scaffold/.nccgs/templates/migration-plan.md +40 -0
  273. package/scaffold/.nccgs/templates/waiver.md +11 -0
  274. package/scripts/cli.mjs +56 -0
  275. package/scripts/install.mjs +267 -0
  276. package/scripts/sync-unity-skills.mjs +126 -0
  277. package/scripts/validate.mjs +205 -0
  278. package/tests/framework.test.mjs +121 -0
@@ -0,0 +1,239 @@
1
+ # Convert Essential Kit Billing to Unity IAP 5
2
+
3
+ ## Table of Contents
4
+
5
+ - [Trigger Phrases](#trigger-phrases)
6
+ - [Important Constraints](#important-constraints)
7
+ - [Step 1 — Verify Essential Kit Billing Is Active](#step-1--verify-essential-kit-billing-is-active)
8
+ - [Step 2 — Extract Product Definitions](#step-2--extract-product-definitions)
9
+ - [Step 3 — Migration Report (produce before any edits)](#step-3--migration-report-produce-before-any-edits)
10
+ - [Step 4 — Add Unity IAP 5](#step-4--add-unity-iap-5)
11
+ - [Step 5 — Disable Essential Kit Billing](#step-5--disable-essential-kit-billing)
12
+ - [Step 6 — Remove Conflicting Gradle Dependency](#step-6--remove-conflicting-gradle-dependency)
13
+ - [Step 7 — Essential Kit → Unity IAP Concept Mapping](#step-7--essential-kit--unity-iap-concept-mapping)
14
+ - [Step 8 — Verification Report](#step-8--verification-report)
15
+
16
+ Use this reference when the project uses Essential Kit (VoxelBusters) Billing Services and needs to be converted to `com.unity.purchasing` (Unity IAP 5). Always install the latest stable version of Unity IAP.
17
+
18
+ ---
19
+
20
+ ## Trigger Phrases
21
+
22
+ - "Convert Essential Kit billing function to Unity IAP"
23
+ - "Replace VoxelBusters Essential Kit IAP with Unity IAP"
24
+ - "Migrate from Essential Kit in-app purchases to Unity IAP"
25
+ - "Remove Essential Kit billing and use Unity IAP"
26
+
27
+ ---
28
+
29
+ ## Important Constraints
30
+
31
+ - **Do not delete any Essential Kit source files.** Disabling the Billing service toggle in settings is sufficient to prevent Essential Kit from initializing native billing at runtime. No C# source changes are needed.
32
+ - **Leave all other Essential Kit services completely untouched.** Only the Billing service and its Gradle dependency are affected.
33
+ - **Do not change product IDs.** The same IDs used in Essential Kit must be used in Unity IAP to preserve store history and existing purchases.
34
+ - **Do not change backend validation endpoints** unless the receipt format change makes it unavoidable — document any required backend change.
35
+ - **This path covers store billing (Apple App Store / Google Play) only.** Do not consider IAP D2C Capabilities / third-party payment provider migration here.
36
+
37
+ ---
38
+
39
+ ## Step 1 — Verify Essential Kit Billing Is Active
40
+
41
+ ### 1a — Confirm Essential Kit is installed
42
+
43
+ Search `Packages/manifest.json` for `com.voxelbusters.essentialkit` and check that `Assets/Plugins/VoxelBusters/` exists.
44
+
45
+ ### 1b — Check Billing service is enabled
46
+
47
+ Read `Resources/EssentialKitSettings.asset` (Unity YAML serialized file). Search for the Billing Services enabled flag:
48
+
49
+ ```
50
+ billingServicesEnabled|isBillingServicesEnabled|BillingServices.*enabled: 1
51
+ ```
52
+
53
+ Also inspect the file for any `BillingServicesSettings` section.
54
+
55
+ If the Billing service flag is **not set to enabled (1)**, stop and report:
56
+
57
+ > "Essential Kit Billing Services is not enabled in Project Settings (Window > Voxel Busters > Essential Kit > Open Settings → Services). There is nothing to convert."
58
+
59
+ Do not proceed.
60
+
61
+ ### 1c — Check Unity IAP package status
62
+
63
+ Search `Packages/manifest.json` for `com.unity.purchasing`. If absent or outdated, install the latest stable version via Package Manager before continuing.
64
+
65
+ ---
66
+
67
+ ## Step 2 — Extract Product Definitions
68
+
69
+ Read `Resources/EssentialKitSettings.asset` and locate the products array under `BillingServicesSettings`. Each product entry contains:
70
+
71
+ | Essential Kit Field | Description |
72
+ |---|---|
73
+ | `Id` | Internal product identifier used in code (e.g., `coins_100`) |
74
+ | `PlatformId` | Common store product ID across platforms |
75
+ | `PlatformIdOverrides` | Per-platform IDs — separate entries for iOS (`AppleAppStore`) and Android (`GooglePlay`) |
76
+ | `ProductType` | `Consumable`, `NonConsumable`, or `Subscription` |
77
+ | `Title` | Display name |
78
+ | `Description` | User-facing description |
79
+
80
+ If **no products are defined** in the settings asset, stop and report:
81
+
82
+ > "No billing products found in Essential Kit Billing Settings. There is nothing to convert."
83
+
84
+ Do not proceed.
85
+
86
+ ### Product type mapping
87
+
88
+ | Essential Kit `BillingProductType` | Unity IAP `ProductType` |
89
+ |---|---|
90
+ | `Consumable` | `ProductType.Consumable` |
91
+ | `NonConsumable` | `ProductType.NonConsumable` |
92
+ | `Subscription` | `ProductType.Subscription` |
93
+
94
+ ### Store-specific IDs
95
+
96
+ If `PlatformIdOverrides` has separate Apple and Google IDs, use `StoreSpecificIds` in the `ProductDefinition`:
97
+
98
+ ```csharp
99
+ new ProductDefinition("coins_100", ProductType.Consumable,
100
+ new StoreSpecificIds
101
+ {
102
+ { AppleAppStore.Name, "apple_coins_100" },
103
+ { GooglePlay.Name, "google_coins_100" }
104
+ })
105
+ ```
106
+
107
+ If only a single `PlatformId` is used, pass it directly as the product ID.
108
+
109
+ ---
110
+
111
+ ## Step 3 — Migration Report (produce before any edits)
112
+
113
+ Generate all sections before touching any file.
114
+
115
+ 1. **Essential Kit billing architecture** — event-based (`OnTransactionStateChange`), auto-finish vs manual-finish mode (`AutoFinishTransactions` setting)
116
+ 2. **Files using Essential Kit Billing** — C# files referencing `BillingServices`, scene/prefab shop UI
117
+ 3. **Product catalog extracted** — all products with ID, type, and store-specific IDs
118
+ 4. **Auto Finish Transactions setting** — if disabled, the project uses server-side verification; document the receipt field mapping change (see Step 7)
119
+ 5. **Backend validation mapping** — how receipt data sent to backend changes
120
+ 6. **Restore flow mapping** — `RestorePurchases()` → `store.RestoreTransactions()` + `store.FetchPurchases()`
121
+ 7. **UI wiring** — shop buttons and callbacks that will need rewiring to Unity IAP events
122
+ 8. **Proposed Unity IAP architecture** — new files, product catalog definition
123
+ 9. **Files to create / modify**
124
+ 10. **Manual steps required** — listed in Step 8
125
+
126
+ ---
127
+
128
+ ## Step 4 — Add Unity IAP 5
129
+
130
+ Use the product catalog extracted in Step 2 as input and follow **`path-add-iap-to-new-project.md`** for the full Unity IAP 5 implementation. Specifically:
131
+
132
+ - Match the project's existing patterns for the IAPManager (Step 4 of that file).
133
+ - Apply the save-before-confirm contract (Step 5 of that file).
134
+ - Apply product type behavior rules (Step 6 of that file) — note that consumable restore rules are the same: do not restore old consumable orders.
135
+ - Use the existing save system found in the project (Step 7 of that file).
136
+ - Rewire existing shop UI buttons to `IAPManager.Buy(productId)` (Step 8 of that file).
137
+
138
+ Do not duplicate content from `path-add-iap-to-new-project.md` — reference it.
139
+
140
+ ---
141
+
142
+ ## Step 5 — Disable Essential Kit Billing
143
+
144
+ After Unity IAP is in place, disable the Essential Kit Billing service to prevent it from initializing its own native billing layer (which would conflict with Unity IAP at runtime).
145
+
146
+ **Edit `Resources/EssentialKitSettings.asset`** — set the Billing Services enabled flag to `0`:
147
+
148
+ ```yaml
149
+ # Before
150
+ billingServicesEnabled: 1
151
+
152
+ # After
153
+ billingServicesEnabled: 0
154
+ ```
155
+
156
+ Do not modify any other field in this file. Do not delete the file. Do not touch any other section of the settings asset.
157
+
158
+ This single change prevents Essential Kit from calling `BillingClient.startConnection()` (Android) or initializing StoreKit (iOS) at startup. All Essential Kit C# billing source files remain in place and will compile normally — the service simply will not be initialized.
159
+
160
+ ---
161
+
162
+ ## Step 6 — Remove Conflicting Gradle Dependency
163
+
164
+ Search `Assets/Plugins/VoxelBusters/EssentialKit/Essentials/Editor/CrossPlatformEssentialKitDependencies.xml` for `com.android.billingclient`. If the file does not exist or contains no `com.android.billingclient` entries, **skip this step entirely**.
165
+
166
+ If found, Essential Kit's billing Gradle dependency conflicts with Unity IAP's own BillingClient. Remove only the billing dependency line(s):
167
+
168
+ ```xml
169
+ <!-- Remove these lines -->
170
+ <androidPackage spec="com.android.billingclient:billing:VERSION" />
171
+ <androidPackage spec="com.android.billingclient:billing-ktx:VERSION" />
172
+ ```
173
+
174
+ Leave all other `<androidPackage>` entries in the file untouched.
175
+
176
+ After editing, run **Assets > External Dependency Manager > Android Resolver > Resolve** (or Force Resolve) to regenerate the Gradle dependency list.
177
+
178
+ ---
179
+
180
+ ## Step 7 — Essential Kit → Unity IAP Concept Mapping
181
+
182
+ ### API mapping
183
+
184
+ | Essential Kit | Unity IAP 5 |
185
+ |---|---|
186
+ | `BillingServices.InitializeStore()` | `store.Connect()` → `store.FetchProducts(definitions)` |
187
+ | `BillingServices.OnInitializeStoreComplete` | `store.OnStoreConnected` + `store.OnProductsFetched` |
188
+ | `BillingServices.BuyProduct(product, options)` | `store.PurchaseProduct(product)` |
189
+ | `BillingServices.OnTransactionStateChange` (Purchased) | `store.OnPurchasePending` |
190
+ | `BillingServices.OnTransactionStateChange` (Failed) | `store.OnPurchaseFailed` |
191
+ | `BillingServices.OnTransactionStateChange` (Deferred) | `store.OnPurchaseDeferred` |
192
+ | `BillingServices.FinishTransactions(transactions)` | `store.ConfirmPurchase(pendingOrder)` |
193
+ | `BillingServices.RestorePurchases(forceRefresh)` | `store.RestoreTransactions(callback)` (user-triggered) + `store.FetchPurchases()` (startup) |
194
+ | `BillingServices.OnRestorePurchasesComplete` | `store.OnPurchasesFetched` + `store.RestoreTransactions` callback |
195
+ | `BillingServices.IsProductPurchased(id)` | `store.CheckEntitlement(product)` + `store.OnCheckEntitlement` |
196
+ | `BillingServices.CanMakePayments()` | `store.AppleStoreExtendedService?.canMakePayments` (Apple only) |
197
+ | `BillingServices.GetProductWithId(id)` | `store.GetProductById(id)` |
198
+ | `BillingServices.GetTransactions()` | `store.GetPurchases()` |
199
+ | `IBillingProduct` | `Product` |
200
+ | `IBillingTransaction` | `PendingOrder` (on `OnPurchasePending`) |
201
+ | `product.Price.LocalizedText` | `product.metadata.localizedPriceString` |
202
+ | `product.LocalizedTitle` | `product.metadata.localizedTitle` |
203
+ | `product.LocalizedDescription` | `product.metadata.localizedDescription` |
204
+
205
+ ### Receipt / validation mapping
206
+
207
+ | Essential Kit | Unity IAP 5 |
208
+ |---|---|
209
+ | `transaction.Receipt` (iOS JWS token) | `pendingOrder.Info.Apple?.jwsRepresentation` |
210
+ | `transaction.RawData` JSON (`transaction` + `signature` fields, Android) | `pendingOrder.Info.Receipt` (contains the full Google receipt JSON) |
211
+
212
+ If the project sends `transaction.RawData` to a backend, document the receipt format change — the backend must now parse `order.Info.Receipt` instead.
213
+
214
+ ### Auto Finish Transactions
215
+
216
+ Essential Kit's `AutoFinishTransactions` setting maps to Unity IAP's two-step flow:
217
+
218
+ | EK Setting | Unity IAP equivalent |
219
+ |---|---|
220
+ | `AutoFinishTransactions = true` | Call `ConfirmPurchase(pendingOrder)` immediately after granting content |
221
+ | `AutoFinishTransactions = false` (server verification) | Hold the `PendingOrder` reference, send receipt to server, call `ConfirmPurchase` only after server confirms — never confirm before grant |
222
+
223
+ ---
224
+
225
+ ## Step 8 — Verification Report
226
+
227
+ After applying changes, produce a report with these sections:
228
+
229
+ 1. **Files changed** — list with nature of each change
230
+ 2. **Product catalog** — all product IDs, types, and store-specific IDs
231
+ 3. **Essential Kit Billing service** — confirmed disabled in `EssentialKitSettings.asset`
232
+ 4. **Gradle dependency** — confirmed `com.android.billingclient:billing` removed from `CrossPlatformEssentialKitDependencies.xml`
233
+ 5. **Receipt / backend mapping** — any backend changes required
234
+ 6. **Manual steps still required:**
235
+ - Run **Assets > External Dependency Manager > Android Resolver > Force Resolve** after editing the dependencies XML
236
+ - Verify no duplicate `BillingClient` classes in the Android build (`./gradlew dependencies` or check Unity build log)
237
+ - Confirm Essential Kit Billing service is visually disabled in **Window > Voxel Busters > Essential Kit > Open Settings → Services**
238
+ - Verify all existing App Store Connect / Google Play Console product IDs match the Unity IAP catalog exactly
239
+ - Test with sandbox/license test accounts
@@ -0,0 +1,275 @@
1
+ # RevenueCat — Conversion Assessment and Guidance
2
+
3
+ ## Table of Contents
4
+
5
+ - [Trigger Phrases](#trigger-phrases)
6
+ - [Overview](#overview)
7
+ - [Step 1 — Check If Already in Observer Mode](#step-1--check-if-already-in-observer-mode)
8
+ - [Step 2 — Feature Support Check](#step-2--feature-support-check)
9
+ - [Step 3 — Platform Support Check](#step-3--platform-support-check)
10
+ - [Step 4 — Route to Outcome](#step-4--route-to-outcome)
11
+ - [Case 1 — Already in Observer Mode with Unity IAP 5](#case-1--already-in-observer-mode-with-unity-iap-5)
12
+ - [Case 2 — Blocker Detected (Amazon or Unsupported Features)](#case-2--blocker-detected-amazon-or-unsupported-features)
13
+ - [Case 3 — No Blockers, Conversion Is Viable](#case-3--no-blockers-conversion-is-viable)
14
+
15
+ Use this reference when the project has RevenueCat (`com.revenuecat.purchases-unity`) installed and the user wants to **replace or remove RevenueCat** and switch to Unity IAP 5 (`com.unity.purchasing`). This path does not cover adding Unity IAP 5 alongside RevenueCat for non-IAP purposes (e.g., IAP D2C Capabilities).
16
+
17
+ ---
18
+
19
+ ## Trigger Phrases
20
+
21
+ - "Replace RevenueCat with Unity IAP"
22
+ - "Remove RevenueCat and use Unity IAP"
23
+ - "Migrate from RevenueCat to Unity IAP"
24
+ - "Convert RevenueCat to Unity IAP 5"
25
+ - "Stop using RevenueCat"
26
+
27
+ ---
28
+
29
+ ## Overview
30
+
31
+ RevenueCat is architecturally independent from Unity IAP — it calls Apple StoreKit and Google BillingClient directly via its own native SDKs. Because of this, there is no simple "swap" — conversion requires assessing what RevenueCat features the project uses, what platforms it targets, and how much of RevenueCat's value Unity IAP 5 can actually replace.
32
+
33
+ This path always produces one of three outcomes:
34
+
35
+ | Case | Condition | Outcome |
36
+ |---|---|---|
37
+ | **1** | Already in observer mode with Unity IAP 5 | Report — no action needed |
38
+ | **2** | Blocker found: Amazon store targeted, or RevenueCat-only features in use | Report blockers, present two choices |
39
+ | **3** | No blockers — no Amazon, no RevenueCat-only features | Present two conversion choices |
40
+
41
+ Run Steps 1–3 in order. Collect all findings before routing.
42
+
43
+ ---
44
+
45
+ ## Step 1 — Check If Already in Observer Mode
46
+
47
+ ### 1a — Check Unity IAP 5 is installed
48
+
49
+ Search `Packages/manifest.json` for `com.unity.purchasing` with a version matching `5\.`. Record whether it is present.
50
+
51
+ ### 1b — Check RevenueCat observer mode configuration
52
+
53
+ Search `Assets/**/*.cs` for:
54
+
55
+ ```
56
+ PurchasesAreCompletedBy\.MyApp|PurchasesAreCompletedBy\.YourApp|observerMode\s*=\s*true|SetPurchasesAreCompletedBy
57
+ ```
58
+
59
+ If found, observer mode is active.
60
+
61
+ **If both Unity IAP 5 is installed AND observer mode is active → this is Case 1. Skip Steps 2–3 and go directly to [Case 1](#case-1--already-in-observer-mode-with-unity-iap-5).**
62
+
63
+ Otherwise continue to Step 2.
64
+
65
+ ---
66
+
67
+ ## Step 2 — Feature Support Check
68
+
69
+ Search `Assets/**/*.cs`, `Assets/**/*.prefab`, and `Assets/**/*.unity` for usage of RevenueCat features that have **no Unity IAP 5 equivalent**. Record every feature found.
70
+
71
+ ### 2a — Remote Paywalls / Offerings
72
+
73
+ ```
74
+ GetOfferings|Offerings|Offering\b|Package\b.*revenuecat|RevenueCatUI|PaywallView|PresentPaywall
75
+ ```
76
+
77
+ Also check `Packages/manifest.json` for `com.revenuecat.purchases-ui-unity`.
78
+
79
+ **What it means:** RevenueCat's Offerings system lets you configure products and paywall layouts remotely without an app update. Unity IAP 5 has no remote paywall or Offerings system — all products must be defined in code or a local catalog.
80
+
81
+ ### 2b — A/B Testing / Experiments
82
+
83
+ ```
84
+ GetCurrentOffering|Experiments|currentOffering
85
+ ```
86
+
87
+ **What it means:** RevenueCat Experiments allows server-side A/B testing of product prices and paywall layouts. Unity IAP 5 has no A/B testing capability.
88
+
89
+ ### 2c — Cross-Platform Entitlement Sync
90
+
91
+ ```
92
+ LogIn|LogOut|Purchases\.SharedPurchases|appUserId|CustomerInfo
93
+ ```
94
+
95
+ Specifically look for `LogIn` being called with a user ID — this indicates the project relies on RevenueCat as the cross-platform entitlement source of truth (a user who buys on iOS retains access on Android). Unity IAP 5 has no cross-platform entitlement layer — each platform's receipt is independent.
96
+
97
+ ### 2d — Webhook-Driven Backend Events
98
+
99
+ Search `Assets/**/*.cs` for patterns suggesting server-side subscription event handling:
100
+
101
+ ```
102
+ webhook|SubscriptionStatusChange|EntitlementRevoked|BillingIssue
103
+ ```
104
+
105
+ Also ask the user: *"Does your backend receive RevenueCat webhook events for subscription renewals, cancellations, or billing issues?"* If yes, flag this — Unity IAP 5 delivers no server-side lifecycle events.
106
+
107
+ ### 2e — Offline Entitlement Caching
108
+
109
+ ```
110
+ offlineCustomerInfo|OfflineEntitlements|entitlementVerification
111
+ ```
112
+
113
+ **What it means:** RevenueCat's offline entitlement feature processes and caches entitlements during server outages. Unity IAP 5 has no equivalent — if the store is unreachable, entitlement state is unavailable.
114
+
115
+ ---
116
+
117
+ ## Step 3 — Platform Support Check
118
+
119
+ ### 3a — Native Google BillingClient detection
120
+
121
+ Search the following for custom native billing code alongside RevenueCat:
122
+
123
+ - `Assets/**/*.cs` for: `AndroidJavaObject|AndroidJavaClass|BillingClient|BillingManager|GoogleBilling`
124
+ - `Assets/Plugins/Android/**/*.java`, `*.kt` for: `com\.android\.billingclient`
125
+
126
+ **If found:** The project has custom native Google BillingClient code in addition to RevenueCat. This is unusual — flag it to the user. Native BillingClient code will conflict with Unity IAP 5 at runtime and must be removed or replaced as part of the conversion. Add it to the blockers list in Case 2 if native BillingClient code is active and not just scaffolding.
127
+
128
+ ### 3b — Amazon Appstore detection
129
+
130
+ Search the following for Amazon signals:
131
+
132
+ - `Packages/manifest.json` and `Packages/packages-lock.json` for: `amazon`
133
+ - `Assets/**/*.cs` for: `useAmazon|SetUseAmazon|AmazonStore|SyncAmazonPurchase`
134
+ - `ProjectSettings/ProjectSettings.asset` for Amazon as an enabled build target
135
+
136
+ **If found:** Amazon is a hard blocker. Unity IAP 5 has removed Amazon Appstore support entirely. RevenueCat observer mode is also broken for Amazon — `syncPurchases()` does not work on Amazon builds and requires `syncAmazonPurchase()` with full purchase details.
137
+
138
+ ---
139
+
140
+ ## Step 4 — Route to Outcome
141
+
142
+ Evaluate findings from Steps 2 and 3:
143
+
144
+ ```
145
+ If Amazon detected (Step 3b) → Case 2
146
+ If native BillingClient detected (Step 3a) → Case 2 (flag as additional blocker)
147
+ If any Step 2 feature detected → Case 2
148
+ If no blockers from Steps 2 or 3 → Case 3
149
+ ```
150
+
151
+ If multiple blockers are found, list all of them in the Case 2 report — do not stop at the first.
152
+
153
+ ---
154
+
155
+ ## Case 1 — Already in Observer Mode with Unity IAP 5
156
+
157
+ **Condition:** Unity IAP 5 installed and RevenueCat already configured in observer mode.
158
+
159
+ Report and stop:
160
+
161
+ > "This project already has Unity IAP 5 installed and RevenueCat is running in observer mode (`PurchasesAreCompletedBy.MyApp`). The two SDKs are already co-operating — Unity IAP 5 handles purchase transactions and RevenueCat validates and tracks them server-side.
162
+ >
163
+ > If you want to remove RevenueCat entirely, re-run this skill and specify that you want to stop using RevenueCat. That will route to a full removal assessment."
164
+
165
+ Do not make any changes.
166
+
167
+ ---
168
+
169
+ ## Case 2 — Blocker Detected (Amazon or Unsupported Features)
170
+
171
+ **Condition:** Amazon store is targeted, or one or more RevenueCat-only features are in active use.
172
+
173
+ Produce a blockers report listing every issue found, then present two choices:
174
+
175
+ > "The following blockers were found that prevent a clean conversion to Unity IAP 5:
176
+ >
177
+ > [List all detected blockers, e.g.:]
178
+ > - **Amazon Appstore**: Unity IAP 5 does not support Amazon. RevenueCat observer mode does not work on Amazon builds either — `syncPurchases()` is broken for Amazon and requires manual `syncAmazonPurchase()` calls. Dropping Amazon support is the only viable path if Unity IAP 5 is the sole billing backend.
179
+ > - **Cross-platform entitlement sync** (`LogIn` detected): Unity IAP 5 has no cross-platform entitlement layer. A user who purchases on iOS will not retain access on Android without a custom server-side solution.
180
+ > - **Remote Paywalls / Offerings**: Unity IAP 5 has no remote paywall system. All products and paywall layouts must be defined in code or a local catalog.
181
+ > - **Subscription webhooks**: Your backend appears to receive RevenueCat webhook events. Unity IAP 5 delivers no server-side lifecycle events — you would need to build your own subscription tracking infrastructure.
182
+ >
183
+ > **Your options:**
184
+ >
185
+ > **(a) Stop conversion (recommended)** — Keep RevenueCat as the billing backend. The features and platforms in use have no Unity IAP 5 equivalent. No changes will be made.
186
+ >
187
+ > **(b) Convert to observer mode + Unity IAP 5 anyway** — Unity IAP 5 takes over purchase transactions for Google Play and Apple App Store. RevenueCat switches to observer mode and continues server-side validation and lifecycle tracking. You accept the following consequences:
188
+ > - Amazon Appstore billing will stop working.
189
+ > - [List each unsupported feature and its consequence.]
190
+ > - BillingClient Gradle conflict between Unity IAP 5 and RevenueCat must be resolved by excluding the conflicting dependency.
191
+ >
192
+ > Which would you like to do?"
193
+
194
+ If the user chooses **(a)**: stop, make no changes.
195
+
196
+ If the user chooses **(b)**: continue with [Case 3, Path A](#path-a--convert-to-observer-mode--unity-iap-5) but preface the report with a clear warning documenting every accepted consequence.
197
+
198
+ ---
199
+
200
+ ## Case 3 — No Blockers, Conversion Is Viable
201
+
202
+ **Condition:** No Amazon support, no RevenueCat-only features detected.
203
+
204
+ Present two choices:
205
+
206
+ > "No blockers were found. The project uses RevenueCat only for basic purchase flow (no remote paywalls, no cross-platform entitlements, no Amazon). Two conversion paths are available:
207
+ >
208
+ > **(a) Observer mode + Unity IAP 5** — Unity IAP 5 handles purchase transactions. RevenueCat stays in observer mode for server-side validation and subscription lifecycle tracking. Lower risk — RevenueCat's `CustomerInfo` and webhook delivery continue to work.
209
+ >
210
+ > **(b) Full removal — Unity IAP 5 only** — RevenueCat is removed entirely. Unity IAP 5 handles all billing. You lose RevenueCat's server-side receipt validation, subscription lifecycle tracking, and analytics. Simpler architecture, no RevenueCat subscription cost.
211
+ >
212
+ > Which path would you like?"
213
+
214
+ ---
215
+
216
+ ### Path A — Convert to Observer Mode + Unity IAP 5
217
+
218
+ 1. **Install Unity IAP 5** if not already present — follow Step 1 of [path-add-iap-to-new-project.md](path-add-iap-to-new-project.md).
219
+
220
+ 2. **Resolve the BillingClient Gradle conflict.** Both SDKs bundle `com.android.billingclient`. Unity IAP 5 declares `com.android.billingclient:billing:9.0.0` via `Plugins/UnityPurchasing/Android/IAPResolver/IAPAndroidDependencies.cs` — do **not** add a project-wide `configurations.all { exclude group: 'com.android.billingclient' }` in `mainTemplate.gradle`, as that will strip Unity IAP's own BillingClient along with RevenueCat's and leave the Android build with no BillingClient at all.
221
+
222
+ Instead, remove only RevenueCat's copy:
223
+ - Locate RevenueCat's EDM4U dependency file (typically `Assets/RevenueCat/Editor/RevenueCatDependencies.xml` or similar) and delete the `<androidPackage spec="com.android.billingclient:billing:..."/>` entry, **or**
224
+ - After Force Resolve, delete the RevenueCat-contributed `billing-*.aar` from `Assets/Plugins/Android/` and keep the one contributed by Unity IAP.
225
+
226
+ Then run **Assets > External Dependency Manager > Android Resolver > Delete Resolved Libraries**, followed by **Force Resolve**.
227
+
228
+ 3. **Switch RevenueCat to observer mode.** In the `Purchases` configuration call, set:
229
+
230
+ ```csharp
231
+ var config = PurchasesConfiguration.Builder.Init("your_api_key")
232
+ .SetPurchasesAreCompletedBy(PurchasesAreCompletedBy.MyApp)
233
+ .Build();
234
+ Purchases.Configure(config);
235
+ ```
236
+
237
+ 4. **Implement Unity IAP 5 purchase flow.** Follow [path-add-iap-to-new-project.md](path-add-iap-to-new-project.md) using the product catalog extracted from the existing RevenueCat `Purchases.GetOfferings()` or hardcoded product IDs found in the codebase.
238
+
239
+ 5. **Call `syncPurchases()` after every confirmed purchase.** In the Unity IAP `OnPurchasePending` handler, after granting content and saving, call:
240
+
241
+ ```csharp
242
+ Purchases.SharedPurchases.SyncPurchases();
243
+ ```
244
+
245
+ This registers the purchase token with RevenueCat's backend so it can validate the receipt and update `CustomerInfo`.
246
+
247
+ 6. **Produce a verification report** covering:
248
+ - Files changed
249
+ - Gradle conflict resolution confirmed
250
+ - RevenueCat observer mode configuration location
251
+ - `SyncPurchases()` call location in purchase flow
252
+ - Manual steps: verify RevenueCat dashboard shows purchases from the updated build in sandbox
253
+
254
+ ---
255
+
256
+ ### Path B — Full Removal of RevenueCat
257
+
258
+ 1. **Extract the product catalog** from existing RevenueCat usage — search for hardcoded product ID strings and `GetOfferings()` calls.
259
+
260
+ 2. **Implement Unity IAP 5** using the extracted catalog — follow [path-add-iap-to-new-project.md](path-add-iap-to-new-project.md) in full.
261
+
262
+ 3. **Remove RevenueCat SDK references from code.** Search `Assets/**/*.cs` for `using RevenueCat;` and all `Purchases.*` calls. Replace with the Unity IAP 5 equivalents from the new `IAPManager`.
263
+
264
+ 4. **Remove RevenueCat packages** from `Packages/manifest.json`:
265
+ - `com.revenuecat.purchases-unity`
266
+ - `com.revenuecat.purchases-ui-unity` (if present)
267
+
268
+ Remove the OpenUPM scoped registry entry for `com.revenuecat` from `manifest.json` if no other RevenueCat packages remain.
269
+
270
+ 5. **Run Assets > External Dependency Manager > Android Resolver > Force Resolve** after package removal to clean up RevenueCat's native dependencies.
271
+
272
+ 6. **Produce a verification report** covering:
273
+ - Files changed and RevenueCat references removed
274
+ - Product catalog — confirm all product IDs are preserved in Unity IAP 5
275
+ - Manual steps: remove the RevenueCat project from the RevenueCat dashboard if no longer needed; verify no orphaned RevenueCat Gradle entries remain in the Android build
@@ -0,0 +1,145 @@
1
+ # UniPay IAP — Assessment and Guidance
2
+
3
+ ## Table of Contents
4
+
5
+ - [Trigger Phrases](#trigger-phrases)
6
+ - [Overview](#overview)
7
+ - [Step 1 — Detect UniPay Version and Unity IAP Version](#step-1--detect-unipay-version-and-unity-iap-version)
8
+ - [Step 2 — Detect Platform Targets](#step-2--detect-platform-targets)
9
+ - [Step 3 — Route Based on Findings](#step-3--route-based-on-findings)
10
+
11
+ Use this reference when the project has UniPay (FLOBUK) installed and the user asks to migrate, convert, or upgrade IAP. This path does **not** perform a conversion — it assesses the project state and either confirms no action is needed, stops with upgrade advice, or stops due to unsupported platforms.
12
+
13
+ ---
14
+
15
+ ## Trigger Phrases
16
+
17
+ - "Migrate from UniPay"
18
+ - "Convert UniPay to Unity IAP"
19
+ - "Remove UniPay"
20
+ - "Upgrade UniPay"
21
+ - "Replace UniPay with Unity IAP"
22
+
23
+ ---
24
+
25
+ ## Overview
26
+
27
+ UniPay wraps `com.unity.purchasing` (Unity IAP) as its underlying billing layer for Apple App Store, Google Play, and Amazon Appstore. It also ships its own separate plugins for Steam, Meta Quest/Oculus, PayPal, and Facebook Instant Games — these platforms have **no Unity IAP equivalent** and cannot be migrated.
28
+
29
+ Because UniPay already uses Unity IAP under the hood, there is no "conversion" to perform for Apple/Google/Amazon billing. The assessment stops at one of three outcomes:
30
+
31
+ | Outcome | Condition |
32
+ |---|---|
33
+ | **Unsupported platform — stop** | Project targets Steam, Meta Quest, PayPal, or Facebook Instant Games |
34
+ | **Upgrade required — stop** | UniPay is present with Unity IAP v4 |
35
+ | **No action needed** | UniPay 6.2.0+ with Unity IAP v5 already installed |
36
+
37
+ ---
38
+
39
+ ## Step 1 — Detect UniPay Version and Unity IAP Version
40
+
41
+ ### 1a — Locate UniPay version
42
+
43
+ Search for UniPay's version in this order:
44
+
45
+ 1. `Assets/Plugins/UniPay/package.json` — read the `"version"` field.
46
+ 2. `Assets/Plugins/SIS/package.json` — legacy path (UniPay was formerly "Simple IAP System").
47
+ 3. `Assets/Plugins/UniPay/Scripts/IAPManager.cs` or any file containing a `VersionNumber` or `version` constant string.
48
+ 4. `ProjectSettings/ProjectSettings.asset` — search for `UniPay` or `SIS` version keys.
49
+
50
+ If the version cannot be determined from any of the above, report:
51
+
52
+ > "UniPay is installed but its version could not be determined. Please check **Edit > Project Settings > UniPay In-App Purchasing** for the installed version and confirm whether it is 6.2.0 or later."
53
+
54
+ Do not stop — proceed to Step 1b with the version marked as unknown.
55
+
56
+ ### 1b — Check Unity IAP version
57
+
58
+ Read `Packages/manifest.json` and find the `com.unity.purchasing` entry.
59
+
60
+ | Result | Note |
61
+ |---|---|
62
+ | Version matches `4\.` | Unity IAP v4 — see routing in Step 3 |
63
+ | Version matches `5\.` | Unity IAP v5 — see routing in Step 3 |
64
+ | Absent | Unexpected — UniPay requires Unity IAP; report the missing dependency and stop |
65
+
66
+ ---
67
+
68
+ ## Step 2 — Detect Platform Targets
69
+
70
+ Search `ProjectSettings/ProjectSettings.asset` for the enabled build targets. Also search `Assets/**/*.cs` and `Assets/Plugins/` for integration signals:
71
+
72
+ | Signal to search for | Platform implied |
73
+ |---|---|
74
+ | `Steamworks|SteamManager|SteamAPI|com\.rlabrecque\.steamworks` | Steam (Standalone PC/Mac) |
75
+ | `OculusSDK|OVRManager|com\.oculus|Meta Quest|com\.unity\.xr\.oculus` | Meta Quest / Oculus |
76
+ | `PayPal|PayPalManager|PAYPAL` in C# or prefabs | PayPal (WebGL) |
77
+ | `FacebookSDK|FB\.Init|com\.facebook\.sdk` | Facebook Instant Games |
78
+
79
+ These platforms use UniPay's own billing plugins — **Unity IAP 5 has no equivalent for any of them.** If any are detected, they must be flagged as blockers (see Step 3, Route C).
80
+
81
+ ---
82
+
83
+ ## Step 3 — Route Based on Findings
84
+
85
+ Apply the first matching route below.
86
+
87
+ ---
88
+
89
+ ### Route A — Unsupported Platform Detected (stop)
90
+
91
+ **Condition:** Step 2 found Steam, Meta Quest, PayPal, or Facebook Instant Games signals.
92
+
93
+ Stop and report:
94
+
95
+ > "This project uses UniPay's [platform] integration. Unity IAP 5 does not support [platform] — there is no migration path for this billing backend. No changes will be made.
96
+ >
97
+ > If you want to continue using [platform] billing, keep UniPay. If you are dropping [platform] support entirely, remove the platform-specific UniPay integration manually first, then re-run this skill."
98
+
99
+ List every unsupported platform found. Do not proceed with any changes.
100
+
101
+ ---
102
+
103
+ ### Route B — Upgrade Required (Unity IAP v4 detected)
104
+
105
+ **Condition:** `com.unity.purchasing` version matches `4\.`, regardless of UniPay version.
106
+
107
+ Stop and report:
108
+
109
+ > "This project uses Unity IAP v4 as UniPay's billing backend. UniPay 6.2.0+ requires Unity IAP v5 and Unity 6.
110
+ >
111
+ > **Required upgrades before any IAP work can proceed:**
112
+ > 1. Upgrade the Unity Editor to the latest stable Unity 6 release.
113
+ > 2. Upgrade `com.unity.purchasing` to the latest stable v5 release via **Window > Package Manager**.
114
+ > 3. Upgrade UniPay to version 6.2.0 or later — purchase the latest version from the Unity Asset Store and follow FLOBUK's upgrade instructions.
115
+ >
116
+ > Once all three upgrades are complete, re-run this skill."
117
+
118
+ Do not make any code or package changes. Do not proceed.
119
+
120
+ ---
121
+
122
+ ### Route C — No Action Needed (UniPay 6.2.0+ with IAP v5)
123
+
124
+ **Condition:** Unity IAP v5 is installed and UniPay version is 6.2.0 or later (or version is unknown but IAP v5 is confirmed).
125
+
126
+ Check the exact `com.unity.purchasing` version from `Packages/manifest.json` and include it in the report:
127
+
128
+ **If `com.unity.purchasing` is v5.0–5.3:**
129
+
130
+ > "This project already uses UniPay [version] with Unity IAP v5.x as its billing backend. UniPay handles the IAP layer — no migration or conversion is needed.
131
+ >
132
+ > Note: IAP D2C Capabilities (third-party payment providers such as Stripe or Coda) require Unity IAP v5.4+. If you plan to add D2C support in the future, you will need to upgrade `com.unity.purchasing` to v5.4+ via **Window > Package Manager**.
133
+ >
134
+ > If you want to add new products, modify purchase logic, or handle platform-specific billing behavior, work within UniPay's API (see FLOBUK documentation). If you want to remove UniPay entirely and use Unity IAP 5 directly, that is a manual refactor — ask specifically for that and describe which UniPay features you are replacing."
135
+
136
+ **If `com.unity.purchasing` is v5.4+:**
137
+
138
+ > "This project already uses UniPay [version] with Unity IAP v5.4+ as its billing backend. UniPay handles the IAP layer — no migration or conversion is needed.
139
+ >
140
+ > If you want to add new products, modify purchase logic, or handle platform-specific billing behavior, work within UniPay's API (see FLOBUK documentation). If you want to remove UniPay entirely and use Unity IAP 5 directly, that is a manual refactor — ask specifically for that and describe which UniPay features you are replacing."
141
+
142
+ Do not make any changes. This is an informational stop.
143
+
144
+ ---
145
+