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,563 @@
1
+ # Cloud Code Reference
2
+
3
+ ## Table of Contents
4
+
5
+ - [Anti-Hallucination Reference](#anti-hallucination-reference)
6
+ - [Two Execution Models](#two-execution-models)
7
+ - [ICloudCodeService Methods](#icloudcodeservice-methods)
8
+ - [Module Runtime Constraints](#module-runtime-constraints)
9
+ - [Subscriptions](#subscriptions)
10
+ - [Triggers](#triggers)
11
+ - [Module Scope](#module-scope)
12
+ - [Module Creation](#module-creation)
13
+ - [Generated Type-Safe Bindings](#generated-type-safe-bindings)
14
+ - [Code Templates](#code-templates)
15
+ - [Deploying via the Deployment Window](#deploying-via-the-deployment-window)
16
+ - [Error Handling](#error-handling)
17
+
18
+ Accessed via `CloudCodeService.Instance` (`ICloudCodeService`, namespace `Unity.Services.CloudCode`). Assembly: `Unity.Services.CloudCode`.
19
+
20
+ Call `UnityServices.InitializeAsync()` from `com.unity.services.core` and sign in via `com.unity.services.authentication` before use.
21
+
22
+ ---
23
+
24
+ ## Anti-Hallucination Reference
25
+
26
+ | Correct | Incorrect (do NOT use) |
27
+ |---|---|
28
+ | `CallModuleEndpointAsync("Module", "Function", args)` | `CallEndpointAsync` for modules |
29
+ | `CallEndpointAsync("scriptName", args)` | `CallEndpointAsync` for modules -- scripts only |
30
+ | `SubscribeToPlayerMessagesAsync()` -- no parameters | `SubscribeToPlayerMessagesAsync(callbacks)` |
31
+ | `SubscribeToProjectMessagesAsync()` -- no parameters | `SubscribeToGeneralMessagesAsync`, `SubscribeToProjectMessagesAsync(callbacks)` |
32
+ | `subscription.Callbacks.MessageReceived += handler` | Passing callbacks as constructor/method arg |
33
+ | Non-generic `CallEndpointAsync` returns `Task<string>` | Returns `Task` (void) -- it returns a string |
34
+ | Non-generic `CallModuleEndpointAsync` returns `Task<string>` | Returns `Task` (void) -- it returns a string |
35
+ | `EventConnectionState` enum | `SubscriptionEventConnectionState` |
36
+ | `Error` callback is `Action<string>` | `Action<EventConnectionState>` |
37
+
38
+ ---
39
+
40
+ ## Two Execution Models
41
+
42
+ | Model | Language | Client Method | Deployed as |
43
+ |---|---|---|---|
44
+ | **Scripts** | JavaScript | `CallEndpointAsync` | `.js` files via Deployment Window |
45
+ | **Modules** | C# (.NET 9) | `CallModuleEndpointAsync` | `.ccmr` module references via Deployment Window |
46
+
47
+ **Recommendation:** Prefer **C# modules** over JavaScript scripts for production. Modules offer type safety, generated client bindings, and access to NuGet packages. Use scripts only for lightweight prototyping.
48
+
49
+ ---
50
+
51
+ ## ICloudCodeService Methods
52
+
53
+ ```csharp
54
+ // Call a Cloud Code Script endpoint. Returns the script's return value as string.
55
+ Task<string> CallEndpointAsync(string function, Dictionary<string, object> args = default)
56
+
57
+ // Call a Cloud Code Script endpoint with typed deserialization.
58
+ Task<TResult> CallEndpointAsync<TResult>(string function, Dictionary<string, object> args = default)
59
+
60
+ // Call a Cloud Code Module endpoint. Returns the result as string.
61
+ // module = module name (filename of .ccmr without extension), function = method name.
62
+ Task<string> CallModuleEndpointAsync(string module, string function,
63
+ Dictionary<string, object> args = default, CloudCodeModuleScope scope = default)
64
+
65
+ // Call a Cloud Code Module endpoint with typed deserialization.
66
+ Task<TResult> CallModuleEndpointAsync<TResult>(string module, string function,
67
+ Dictionary<string, object> args = default, CloudCodeModuleScope scope = default)
68
+
69
+ // Subscribe to real-time messages sent to the current player. Requires Wire. NO PARAMETERS.
70
+ Task<ISubscriptionEvents> SubscribeToPlayerMessagesAsync()
71
+
72
+ // Subscribe to real-time project-wide messages. Requires Wire. NO PARAMETERS.
73
+ Task<ISubscriptionEvents> SubscribeToProjectMessagesAsync()
74
+ ```
75
+
76
+ **CRITICAL:** The first argument to `CallModuleEndpointAsync` is the **module name**, the second is the **function name**. Do NOT confuse the parameter order.
77
+
78
+ ---
79
+
80
+ ## Module Runtime Constraints
81
+
82
+ - **Cold start:** After ~15 minutes of inactivity, the module's worker shuts down. The next call experiences a latency spike while the worker spins up. Design your UX to tolerate this.
83
+ - **No UnityEngine:** Modules run on standard .NET. The `UnityEngine` namespace is NOT available. Use only .NET APIs and NuGet packages.
84
+ - **Push messages:** Server-to-client push messages can only be sent from **modules**, not from JavaScript scripts.
85
+
86
+ ---
87
+
88
+ ## Subscriptions
89
+
90
+ Cloud Code Subscriptions require `com.unity.services.wire`. Subscribe to real-time server-push messages.
91
+
92
+ ### `ISubscriptionEvents`
93
+
94
+ ```csharp
95
+ public interface ISubscriptionEvents
96
+ {
97
+ SubscriptionEventCallbacks Callbacks { get; } // Wire up handlers here
98
+ Task SubscribeAsync(); // Re-subscribe after unsubscribing
99
+ Task UnsubscribeAsync(); // Stop receiving messages
100
+ }
101
+ ```
102
+
103
+ ### `SubscriptionEventCallbacks`
104
+
105
+ Wire up callbacks on the `Callbacks` property of the returned `ISubscriptionEvents`:
106
+
107
+ ```csharp
108
+ var subscription = await CloudCodeService.Instance.SubscribeToPlayerMessagesAsync();
109
+ subscription.Callbacks.MessageReceived += OnMessageReceived; // Action<IMessageReceivedEvent>
110
+ subscription.Callbacks.MessageBytesReceived += OnBytesReceived; // Action<byte[]>
111
+ subscription.Callbacks.ConnectionStateChanged += OnStateChanged; // Action<EventConnectionState>
112
+ subscription.Callbacks.Kicked += OnKicked; // Action
113
+ subscription.Callbacks.Error += OnError; // Action<string>
114
+ ```
115
+
116
+ ### `IMessageReceivedEvent` Properties
117
+
118
+ | Property | Type | Description |
119
+ |---|---|---|
120
+ | `MessageType` | `string` | Message type identifier set by the server |
121
+ | `Message` | `string` | Raw message payload (typically JSON) |
122
+ | `Id` | `string` | Unique message ID |
123
+ | `CorrelationId` | `string` | Correlation ID for tracing |
124
+ | `Source` | `string` | Source of the message |
125
+ | `Type` | `string` | CloudEvents type |
126
+ | `SpecVersion` | `string` | CloudEvents spec version |
127
+ | `Time` | `DateTime` | Timestamp |
128
+ | `ProjectId` | `string` | UGS project ID |
129
+ | `EnvironmentId` | `string` | UGS environment ID |
130
+
131
+ ### `EventConnectionState`
132
+
133
+ Namespace: `Unity.Services.CloudCode.Subscriptions`.
134
+
135
+ | State | Value | Meaning |
136
+ |---|---|---|
137
+ | `Unknown` | 0 | Initial state |
138
+ | `Unsubscribed` | 1 | Not connected |
139
+ | `Subscribing` | 2 | Connection in progress |
140
+ | `Subscribed` | 3 | Connected and receiving messages |
141
+ | `Unsynced` | 4 | Temporarily disconnected, will reconnect |
142
+ | `Error` | 5 | Connection error |
143
+
144
+ ---
145
+
146
+ ## Triggers
147
+
148
+ Triggers let Cloud Code endpoints run automatically in response to events from other UGS services, without any client call. Configured in the Unity Dashboard or via the UGS CLI, not in client code.
149
+
150
+ | Emitter | Example trigger events |
151
+ |---|---|
152
+ | Authentication | Player signed in, account deleted |
153
+ | Scheduler | Cron-based or one-shot scheduled events |
154
+ | Leaderboards | Score submitted, leaderboard reset |
155
+ | Cloud Save | Data saved, data deleted |
156
+
157
+ ---
158
+
159
+ ## Module Scope
160
+
161
+ `CallModuleEndpointAsync` accepts an optional `CloudCodeModuleScope` to scope execution. Namespace: `Unity.Services.CloudCode.Models`.
162
+
163
+ ```csharp
164
+ // Scope to a multiplayer session
165
+ var scope = new CloudCodeModuleScope(ScopeType.MultiplayerSession, sessionId);
166
+ var result = await CloudCodeService.Instance.CallModuleEndpointAsync<MyResult>(
167
+ "MyModule", "MyFunction", args, scope);
168
+ ```
169
+
170
+ ### `ScopeType` Enum
171
+
172
+ | Scope Type | Value | Description |
173
+ |---|---|---|
174
+ | `MultiplayerSession` | 1 | Scoped to a multiplayer session ID |
175
+ | `Player` | 2 | Scoped to the calling player (default) |
176
+
177
+ ---
178
+
179
+ ## Module Creation
180
+
181
+ A Cloud Code module is a .NET 9 class library built and published by the Deployment Window.
182
+
183
+ **A deployable module requires ALL of the following files — skipping any one breaks the build or deploy step:** the `<Module>.sln` solution, the `<Module>/<Module>.csproj` main project (with the NuGet references shown below), the module class (`<Module>.cs`) with at least one `[CloudCodeFunction]` endpoint, `ModuleSetup.cs` implementing `ICloudCodeSetup`, `<Module>/Properties/PublishProfiles/FolderProfile.pubxml` for the linux-x64 publish, and the `Assets/.../<Module>.ccmr` Unity asset pointing at the `.sln`. A `.ccmr` referencing a missing `.sln`, or a module folder lacking `.csproj`/`FolderProfile.pubxml`, is incomplete and the Deployment Window will fail to publish it.
184
+
185
+ ### Directory Structure
186
+
187
+ Place the module at the **project root** (alongside `Assets/`). Unity does not scan the project root, so no `~` suffix is needed.
188
+
189
+ > **Tilde rule:** Only add `~` to a folder name (e.g. `MyModule~/`) when the module lives **inside `Assets/`** -- the suffix tells Unity to skip that folder during compilation. At the project root, omit it.
190
+
191
+ ```
192
+ <ProjectRoot>/
193
+ Assets/
194
+ CloudCode/
195
+ MyModule.ccmr <-- Unity asset pointing to the .sln
196
+ MyModuleCCM/
197
+ MyModule.sln
198
+ MyModule/
199
+ MyModule.csproj
200
+ MyModule.cs <-- [CloudCodeFunction] entry points
201
+ ModuleSetup.cs <-- registers IGameApiClient via DI
202
+ Properties/
203
+ PublishProfiles/
204
+ FolderProfile.pubxml <-- publish to linux-x64 (required)
205
+ MyModule.Tests/
206
+ MyModule.Tests.csproj <-- IsPublishable=false, never deployed
207
+ MyModuleTests.cs
208
+ ```
209
+
210
+ ### `.gitignore` (keep module files tracked)
211
+
212
+ Unity's stock `.gitignore` excludes `*.sln` and `*.csproj` project-wide. Without an override the module's `.sln`/`.csproj`/`.pubxml` will be silently untracked, which breaks teammates, CI, and any deploy that pulls from git. Add a `.gitignore` **inside the module directory** that re-includes them:
213
+
214
+ ```
215
+ # <Module>CCM/.gitignore
216
+ !*.sln
217
+ !*.csproj
218
+ !Properties/PublishProfiles/*.pubxml
219
+ ```
220
+
221
+ Verify with `git status` after creating the files -- they must appear as untracked/modified, not be missing from the listing.
222
+
223
+ ### `.sln` File Template
224
+
225
+ Generate fresh GUIDs for `{MAIN-GUID}`, `{TEST-GUID}`, and `{SLN-GUID}` using `[System.Guid]::NewGuid()` in PowerShell or any GUID generator. The test project intentionally has no `Release Build.0` entry to exclude it from Release builds.
226
+
227
+ ```
228
+ Microsoft Visual Studio Solution File, Format Version 12.00
229
+ # Visual Studio Version 16
230
+ VisualStudioVersion = 16.0.30114.105
231
+ MinimumVisualStudioVersion = 10.0.40219.1
232
+ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyModule", "MyModule\MyModule.csproj", "{MAIN-GUID}"
233
+ EndProject
234
+ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyModule.Tests", "MyModule.Tests\MyModule.Tests.csproj", "{TEST-GUID}"
235
+ EndProject
236
+ Global
237
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
238
+ Debug|Any CPU = Debug|Any CPU
239
+ Release|Any CPU = Release|Any CPU
240
+ EndGlobalSection
241
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
242
+ {MAIN-GUID}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
243
+ {MAIN-GUID}.Debug|Any CPU.Build.0 = Debug|Any CPU
244
+ {MAIN-GUID}.Release|Any CPU.ActiveCfg = Release|Any CPU
245
+ {MAIN-GUID}.Release|Any CPU.Build.0 = Release|Any CPU
246
+ {TEST-GUID}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
247
+ {TEST-GUID}.Debug|Any CPU.Build.0 = Debug|Any CPU
248
+ {TEST-GUID}.Release|Any CPU.ActiveCfg = Release|Any CPU
249
+ EndGlobalSection
250
+ GlobalSection(SolutionProperties) = preSolution
251
+ HideSolutionNode = FALSE
252
+ EndGlobalSection
253
+ GlobalSection(ExtensibilityGlobals) = postSolution
254
+ SolutionGuid = {SLN-GUID}
255
+ EndGlobalSection
256
+ EndGlobal
257
+ ```
258
+
259
+ ### `.csproj` (net9.0, CloudCode.Apis 0.0.21, CloudCode.Core 0.0.1)
260
+
261
+ ```xml
262
+ <Project Sdk="Microsoft.NET.Sdk">
263
+
264
+ <PropertyGroup>
265
+ <TargetFramework>net9.0</TargetFramework>
266
+ <Nullable>enable</Nullable>
267
+ <Configurations>Debug;Release</Configurations>
268
+ </PropertyGroup>
269
+
270
+ <ItemGroup>
271
+ <PackageReference Include="Com.Unity.Services.CloudCode.Apis" Version="0.0.21" />
272
+ <PackageReference Include="Com.Unity.Services.CloudCode.Core" Version="0.0.1" />
273
+ <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
274
+ </ItemGroup>
275
+
276
+ <PropertyGroup>
277
+ <PublishReadyToRunComposite>true</PublishReadyToRunComposite>
278
+ </PropertyGroup>
279
+
280
+ </Project>
281
+ ```
282
+
283
+ ### `FolderProfile.pubxml` (linux-x64, SelfContained=false)
284
+
285
+ Cloud Code runs on Linux. `SelfContained=false` keeps the output small -- the runtime is provided by the Cloud Code host.
286
+
287
+ ```xml
288
+ <?xml version="1.0" encoding="utf-8"?>
289
+ <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
290
+ <PropertyGroup>
291
+ <Configuration>Release</Configuration>
292
+ <Platform>Any CPU</Platform>
293
+ <PublishDir>bin\Release\net9.0\publish\</PublishDir>
294
+ <PublishProtocol>FileSystem</PublishProtocol>
295
+ <TargetFramework>net9.0</TargetFramework>
296
+ <RuntimeIdentifier>linux-x64</RuntimeIdentifier>
297
+ <SelfContained>false</SelfContained>
298
+ <PublishSingleFile>False</PublishSingleFile>
299
+ </PropertyGroup>
300
+ </Project>
301
+ ```
302
+
303
+ ### `ModuleSetup.cs` (registers GameApiClient)
304
+
305
+ Required once per module. Registers `GameApiClient` so it can be constructor-injected.
306
+
307
+ ```csharp
308
+ using Microsoft.Extensions.DependencyInjection;
309
+ using Unity.Services.CloudCode.Apis;
310
+ using Unity.Services.CloudCode.Core;
311
+
312
+ public class ModuleSetup : ICloudCodeSetup
313
+ {
314
+ public void Setup(ICloudCodeConfig config)
315
+ {
316
+ config.Dependencies.AddSingleton(GameApiClient.Create());
317
+ }
318
+ }
319
+ ```
320
+
321
+ ### `MyModule.cs` ([CloudCodeFunction], IExecutionContext, IGameApiClient)
322
+
323
+ ```csharp
324
+ using System;
325
+ using System.Globalization;
326
+ using Microsoft.Extensions.Logging;
327
+ using Unity.Services.CloudCode.Apis;
328
+ using Unity.Services.CloudCode.Core;
329
+
330
+ public class MyModule
331
+ {
332
+ readonly IGameApiClient m_GameApiClient;
333
+ readonly ILogger<MyModule> m_Logger;
334
+
335
+ public MyModule(IGameApiClient gameApiClient, ILogger<MyModule> logger)
336
+ {
337
+ m_GameApiClient = gameApiClient;
338
+ m_Logger = logger;
339
+ }
340
+
341
+ // No context needed -- pure computation.
342
+ [CloudCodeFunction("SayHello")]
343
+ public string SayHello(string name) => $"Hello, {name}!";
344
+
345
+ // Add IExecutionContext as a method parameter only when you need player/project info.
346
+ [CloudCodeFunction("GetServerTime")]
347
+ public string GetServerTime(IExecutionContext context)
348
+ => DateTime.UtcNow.ToString(CultureInfo.InvariantCulture);
349
+ }
350
+ ```
351
+
352
+ **Key concepts:**
353
+
354
+ | File / Concept | Purpose |
355
+ |---|---|
356
+ | `[CloudCodeFunction]` | Marks a public method as a callable endpoint |
357
+ | `IExecutionContext` | Optional method parameter -- player ID, project ID, service token |
358
+ | `IGameApiClient` | Constructor-injected via DI -- typed clients for UGS APIs |
359
+ | `ModuleSetup.cs` | Registers `GameApiClient` via `ICloudCodeSetup` -- required once per module |
360
+ | `FolderProfile.pubxml` | Publish profile targeting `linux-x64` -- Cloud Code runs on Linux |
361
+ | `IsPublishable=false` | Prevents test project from being included in `dotnet publish` |
362
+
363
+ **Dependency injection:** `IGameApiClient` and `ILogger<T>` are constructor-injected. `IExecutionContext` is a method parameter (only add it when the function needs player/project info).
364
+
365
+ ### Test Project `.csproj` (IsPublishable=false)
366
+
367
+ `IsPublishable=false` is enforced in two ways: this property, and the omission of `Release Build.0` in the `.sln`. Both are intentional.
368
+
369
+ ```xml
370
+ <Project Sdk="Microsoft.NET.Sdk">
371
+
372
+ <PropertyGroup>
373
+ <TargetFramework>net9.0</TargetFramework>
374
+ <LangVersion>latest</LangVersion>
375
+ <ImplicitUsings>enable</ImplicitUsings>
376
+ <Nullable>enable</Nullable>
377
+ <IsPackable>false</IsPackable>
378
+ <IsPublishable>false</IsPublishable>
379
+ </PropertyGroup>
380
+
381
+ <ItemGroup>
382
+ <PackageReference Include="coverlet.collector" Version="6.0.2" />
383
+ <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
384
+ <PackageReference Include="NUnit" Version="4.2.2" />
385
+ <PackageReference Include="NUnit.Analyzers" Version="4.4.0" />
386
+ <PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
387
+ </ItemGroup>
388
+
389
+ <ItemGroup>
390
+ <Using Include="NUnit.Framework" />
391
+ </ItemGroup>
392
+
393
+ <ItemGroup>
394
+ <ProjectReference Include="..\MyModule\MyModule.csproj" />
395
+ </ItemGroup>
396
+
397
+ </Project>
398
+ ```
399
+
400
+ ### `.ccmr` File Format
401
+
402
+ ```json
403
+ {
404
+ "modulePath": "../../MyModuleCCM/MyModule.sln"
405
+ }
406
+ ```
407
+
408
+ Path is relative to the `.ccmr` file. `../../` goes up from `Assets/CloudCode/` to the project root, then into `MyModuleCCM/`. The filename without `.ccmr` (`MyModule`) is the module name used in `CallModuleEndpointAsync`.
409
+
410
+ ---
411
+
412
+ ## Generated Type-Safe Bindings
413
+
414
+ After deploying the module, generate a strongly-typed wrapper instead of using raw `CallModuleEndpointAsync`. The generator reads the deployed module's metadata and emits one C# file per class under `Assets/CloudCode/GeneratedModuleBindings/`. Do not edit these files -- they are overwritten on regeneration.
415
+
416
+ ### How to Generate
417
+
418
+ - Select the `.ccmr` in the **Project window** then click **Generate Bindings** in the Inspector, or
419
+ - **Services > Cloud Code > Generate Cloud Code Bindings** to regenerate all at once.
420
+
421
+ ### Example
422
+
423
+ ```csharp
424
+ // Assets/CloudCode/GeneratedModuleBindings/MyModuleBindings.cs
425
+ // This file was generated by Cloud Code Bindings Generator. Modifications will be lost upon regeneration.
426
+ public class MyModuleBindings
427
+ {
428
+ readonly ICloudCodeService k_Service;
429
+ public MyModuleBindings(ICloudCodeService service) { k_Service = service; }
430
+
431
+ public async Task<string> SayHello(string name)
432
+ => await k_Service.CallModuleEndpointAsync<string>("MyModule", "SayHello",
433
+ new Dictionary<string, object> { { "name", name } });
434
+ }
435
+ ```
436
+
437
+ ```csharp
438
+ var bindings = new MyModuleBindings(CloudCodeService.Instance);
439
+ var greeting = await bindings.SayHello("World");
440
+ ```
441
+
442
+ **Known limitations:** no distinction between required/optional parameters; tuples are not supported.
443
+
444
+ ---
445
+
446
+ ## Code Templates
447
+
448
+ ### Call a Script Endpoint
449
+
450
+ ```csharp
451
+ using Unity.Services.CloudCode;
452
+ using System.Collections.Generic;
453
+
454
+ var args = new Dictionary<string, object>
455
+ {
456
+ { "level", 5 },
457
+ { "difficulty", "hard" }
458
+ };
459
+
460
+ int reward = await CloudCodeService.Instance.CallEndpointAsync<int>("CalculateReward", args);
461
+ Debug.Log($"Reward: {reward}");
462
+ ```
463
+
464
+ ### Call a Module Endpoint (Typed Result)
465
+
466
+ ```csharp
467
+ // Module class name: "EconomyModule", method: "GrantDailyReward"
468
+ var result = await CloudCodeService.Instance.CallModuleEndpointAsync<GrantResult>(
469
+ "EconomyModule", "GrantDailyReward",
470
+ new Dictionary<string, object> { { "playerId", playerId } });
471
+
472
+ Debug.Log($"Granted: {result.CurrencyAmount} currency");
473
+ ```
474
+
475
+ ### Subscribe to Player Messages (Full Example)
476
+
477
+ ```csharp
478
+ ISubscriptionEvents subscription;
479
+
480
+ async Task SubscribeToMessages()
481
+ {
482
+ // Subscribe first -- no parameters
483
+ subscription = await CloudCodeService.Instance.SubscribeToPlayerMessagesAsync();
484
+
485
+ // Then wire up callbacks via the Callbacks property
486
+ subscription.Callbacks.MessageReceived += OnMessageReceived;
487
+ subscription.Callbacks.ConnectionStateChanged += state =>
488
+ Debug.Log($"Subscription state: {state}");
489
+ subscription.Callbacks.Error += error =>
490
+ Debug.LogError($"Subscription error: {error}");
491
+ subscription.Callbacks.Kicked += () =>
492
+ Debug.LogWarning("Kicked from subscription");
493
+ }
494
+
495
+ void OnMessageReceived(IMessageReceivedEvent evt)
496
+ {
497
+ Debug.Log($"[{evt.MessageType}] {evt.Message}");
498
+ // var data = JsonUtility.FromJson<MyPayload>(evt.Message);
499
+ }
500
+
501
+ async Task Unsubscribe()
502
+ {
503
+ await subscription.UnsubscribeAsync();
504
+ subscription = null;
505
+ }
506
+ ```
507
+
508
+ ---
509
+
510
+ ## Deploying via the Deployment Window
511
+
512
+ 1. Open **Services > Deployment** in the Unity Editor.
513
+ 2. All `.js` and `.ccmr` files under `Assets/` are listed -- click **Deploy All**.
514
+ 3. After deploying a module, generate or regenerate type-safe bindings (see [Generated Type-Safe Bindings](#generated-type-safe-bindings)).
515
+
516
+ ---
517
+
518
+ ## Error Handling
519
+
520
+ ```csharp
521
+ try
522
+ {
523
+ var result = await CloudCodeService.Instance.CallModuleEndpointAsync<MyResult>(
524
+ "MyModule", "MyFunction", args);
525
+ }
526
+ catch (CloudCodeRateLimitedException ex)
527
+ {
528
+ Debug.LogError($"Rate limited. Retry after {ex.RetryAfter}s");
529
+ }
530
+ catch (CloudCodeException ex)
531
+ {
532
+ Debug.LogError($"Cloud Code error: {ex.Message} (reason: {ex.Reason})");
533
+ }
534
+ ```
535
+
536
+ ### `CloudCodeExceptionReason` Enum
537
+
538
+ | Reason | Value | Meaning |
539
+ |---|---|---|
540
+ | `Unknown` | 0 | Unknown error |
541
+ | `NoInternetConnection` | 1 | No network |
542
+ | `ProjectIdMissing` | 2 | Project ID not set |
543
+ | `PlayerIdMissing` | 3 | Player not signed in |
544
+ | `AccessTokenMissing` | 4 | No access token |
545
+ | `InvalidArgument` | 5 | Bad input |
546
+ | `Unauthorized` | 6 | Not authorized |
547
+ | `NotFound` | 7 | Script/module not found |
548
+ | `TooManyRequests` | 8 | Rate limited |
549
+ | `ServiceUnavailable` | 9 | Service down |
550
+ | `ScriptError` | 10 | Script/module execution failure |
551
+ | `SubscriptionError` | 11 | Subscription error |
552
+
553
+ ---
554
+
555
+ ## Asset Store Building Blocks
556
+
557
+ Several Building Blocks from the Unity Asset Store include Cloud Code modules as working reference implementations:
558
+
559
+ - **Achievements Building Block** — Cloud Code module with achievement progress tracking and server-authoritative unlocks. [Asset Store](https://assetstore.unity.com/packages/essentials/tutorial-projects/unity-building-block-achievements-341918)
560
+ - **Player Account Building Block** — Cloud Code module with global score tracking via server-authoritative writes. [Asset Store](https://assetstore.unity.com/packages/essentials/tutorial-projects/unity-building-block-player-account-341928)
561
+ - **Leaderboards Building Block** — Cloud Code modules with number game scoring and leaderboard admin functions. [Asset Store](https://assetstore.unity.com/packages/essentials/tutorial-projects/unity-building-block-leaderboards-341926)
562
+
563
+ Each block includes `.ccmr` module bindings, generated type-safe client bindings, and the full C# module source.