nccgs 2.1.1 → 3.0.0-rc.2
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.
- package/CHANGELOG.md +76 -235
- package/LICENSE +1 -1
- package/README.md +87 -206
- package/THIRD_PARTY_NOTICES.md +6 -34
- package/bin/nccgs.mjs +96 -0
- package/cli/doctor.mjs +82 -0
- package/cli/feedback.mjs +13 -0
- package/cli/install.mjs +111 -0
- package/cli/release.mjs +59 -0
- package/cli/run.mjs +35 -0
- package/cli/spawn.mjs +20 -0
- package/cli/uninstall.mjs +43 -0
- package/cli/update-check.mjs +66 -0
- package/docs/EVIDENCE-VERIFICATION.md +22 -0
- package/package.json +23 -30
- package/runtime/core/diag.mjs +43 -0
- package/runtime/core/feedback-policy.mjs +54 -0
- package/runtime/core/fs.mjs +80 -0
- package/runtime/core/job-object.mjs +73 -0
- package/runtime/core/modes.mjs +87 -0
- package/runtime/core/process-tree.mjs +109 -0
- package/runtime/core/project.mjs +113 -0
- package/runtime/core/snapshot.mjs +114 -0
- package/runtime/hooks/common.mjs +22 -0
- package/runtime/hooks/done-guard.mjs +15 -0
- package/runtime/hooks/guard-mcp.mjs +8 -0
- package/runtime/hooks/guard-shell.mjs +16 -0
- package/runtime/hooks/guard-write.mjs +25 -0
- package/runtime/hooks/session-log.mjs +7 -0
- package/runtime/hooks/session-start.mjs +40 -0
- package/runtime/hooks/unity-transport.mjs +12 -0
- package/runtime/modes.json +39 -0
- package/runtime/task/cost.mjs +103 -0
- package/runtime/task/criteria.mjs +128 -0
- package/runtime/task/feedback.mjs +136 -0
- package/runtime/task/ledger.mjs +109 -0
- package/runtime/task/plan.mjs +69 -0
- package/runtime/task/project.mjs +79 -0
- package/runtime/task/report.mjs +252 -0
- package/runtime/task/task.mjs +238 -0
- package/runtime/unity/assets.mjs +51 -0
- package/runtime/unity/playtest.mjs +145 -0
- package/runtime/unity/unity.mjs +350 -0
- package/scripts/check-job-object.mjs +18 -0
- package/scripts/sync-unity-skills.mjs +35 -119
- package/template/CLAUDE.md +39 -0
- package/template/agents/fast-fix.md +9 -0
- package/template/agents/implementer.md +19 -0
- package/template/agents/playtester.md +15 -0
- package/template/agents/reviewer.md +19 -0
- package/template/agents/scout.md +9 -0
- package/template/ponytail/README.md +8 -0
- package/{.claude/nccgs/packages → template}/ponytail/engineering.md +10 -0
- package/template/protocols/evidence.md +52 -0
- package/template/protocols/playtest.md +45 -0
- package/template/protocols/review.md +34 -0
- package/template/protocols/unity-cli-notes.md +56 -0
- package/template/settings.fragment.json +33 -0
- package/template/skills/art-bible/SKILL.md +19 -0
- package/template/skills/asset-spec/SKILL.md +19 -0
- package/template/skills/brainstorm/SKILL.md +17 -0
- package/template/skills/feedback/SKILL.md +16 -0
- package/template/skills/map-systems/SKILL.md +25 -0
- package/template/skills/playtest/SKILL.md +17 -0
- package/template/skills/status/SKILL.md +18 -0
- package/template/skills/test/SKILL.md +34 -0
- package/template/skills/unity-foundation/SKILL.md +17 -0
- package/template/skills/vertical-slice/SKILL.md +17 -0
- package/template/skills/work/SKILL.md +65 -0
- package/tools/feedback-worker/README.md +12 -0
- package/tools/feedback-worker/worker.js +39 -0
- package/tools/feedback-worker/wrangler.toml +12 -0
- package/unity-skills/2d-pixel-perfect/SKILL.md +208 -0
- package/unity-skills/2d-pixel-perfect/references/api-reference.md +81 -0
- package/unity-skills/2d-pixel-perfect/references/camera-setup-builtin.cs +40 -0
- package/unity-skills/2d-pixel-perfect/references/camera-setup-urp.cs +49 -0
- package/unity-skills/2d-pixel-perfect/references/pipeline-detection.cs +50 -0
- package/unity-skills/2d-pixel-perfect/references/sprite-settings.cs +37 -0
- package/unity-skills/asset-transformer-toolkit/SECURITY.md +15 -0
- package/unity-skills/asset-transformer-toolkit/SKILL.md +39 -0
- package/unity-skills/asset-transformer-toolkit/references/create-importer.md +121 -0
- package/unity-skills/asset-transformer-toolkit/references/lods.md +61 -0
- package/unity-skills/asset-transformer-toolkit/references/rule-api.md +154 -0
- package/unity-skills/asset-transformer-toolkit/references/ruleblock-api.md +37 -0
- package/unity-skills/asset-transformer-toolkit/references/ruleset-api.md +138 -0
- package/unity-skills/asset-transformer-toolkit/references/rulesets-and-actions.md +227 -0
- package/unity-skills/audio-setup-mixers/SECURITY.md +16 -0
- package/unity-skills/audio-setup-mixers/SKILL.md +127 -0
- package/unity-skills/audio-setup-mixers/references/api.md +162 -0
- package/unity-skills/build-gtk/SKILL.md +242 -0
- package/unity-skills/build-gtk/references/graph-api.md +324 -0
- package/unity-skills/build-gtk/references/pitfalls.md +86 -0
- package/unity-skills/build-gtk/references/runtime-and-visualization.md +196 -0
- package/unity-skills/build-gtk/references/state-machine-api.md +286 -0
- package/unity-skills/build-live-game/SKILL.md +255 -0
- package/{.claude/skills → unity-skills}/build-live-game/references/achievements.md +132 -154
- package/{.claude/skills → unity-skills}/build-live-game/references/apis.md +10 -19
- package/{.claude/skills → unity-skills}/build-live-game/references/authentication.md +14 -20
- package/{.claude/skills → unity-skills}/build-live-game/references/battlepass.md +269 -225
- package/unity-skills/build-live-game/references/blueprints-and-samples.md +75 -0
- package/unity-skills/build-live-game/references/cloud-code-cloudbehaviours.md +1111 -0
- package/unity-skills/build-live-game/references/cloud-code-modules.md +1276 -0
- package/unity-skills/build-live-game/references/cloud-code.md +58 -0
- package/{.claude/skills → unity-skills}/build-live-game/references/cloud-save.md +15 -25
- package/{.claude/skills → unity-skills}/build-live-game/references/deployment.md +33 -18
- package/{.claude/skills → unity-skills}/build-live-game/references/player-account.md +31 -23
- package/{.claude/skills → unity-skills}/build-live-game/references/tooling.md +0 -56
- package/unity-skills/build-live-game/references/ugs-cli.md +86 -0
- package/unity-skills/craft-game-floors/SECURITY.md +23 -0
- package/unity-skills/craft-game-floors/SKILL.md +134 -0
- package/unity-skills/craft-game-floors/references/art-direction.md +85 -0
- package/unity-skills/craft-game-floors/references/camera-rigs.md +51 -0
- package/unity-skills/craft-game-floors/references/character-motion.md +35 -0
- package/unity-skills/craft-game-floors/references/game-audio.md +47 -0
- package/unity-skills/craft-game-floors/references/game-feel.md +68 -0
- package/unity-skills/craft-game-floors/references/game-shell.md +45 -0
- package/unity-skills/craft-game-floors/references/live-floor.md +35 -0
- package/unity-skills/craft-game-floors/references/placeholder-assets.md +35 -0
- package/unity-skills/craft-game-floors/references/scene-lighting.md +52 -0
- package/unity-skills/craft-game-floors/references/toon-shading.md +34 -0
- package/unity-skills/craft-game-floors/references/vfx.md +40 -0
- package/unity-skills/craft-game-floors/references/visual-scorecard.md +43 -0
- package/unity-skills/create-2d-physics/SECURITY.md +16 -0
- package/unity-skills/create-2d-physics/SKILL.md +128 -0
- package/unity-skills/create-2d-physics/references/2d-physics-core.md +155 -0
- package/unity-skills/create-2d-physics/references/legacy-2d-physics.md +45 -0
- package/unity-skills/create-tile-palette-or-rule-tiles/SKILL.md +12 -0
- package/unity-skills/create-tile-palette-or-rule-tiles/references/hexagonalruletile.md +71 -0
- package/unity-skills/create-tile-palette-or-rule-tiles/references/palette-create.md +38 -0
- package/unity-skills/create-tile-palette-or-rule-tiles/references/ruletile-createempty.md +35 -0
- package/unity-skills/create-tile-palette-or-rule-tiles/references/ruletile-createfromsegment.md +212 -0
- package/unity-skills/create-tile-palette-or-rule-tiles/references/ruletile.md +90 -0
- package/unity-skills/create-tile-palette-or-rule-tiles/scripts/CreatePaletteTemplate.cs +148 -0
- package/unity-skills/create-tile-palette-or-rule-tiles/scripts/ManualWorkflowExample.cs +63 -0
- package/unity-skills/create-tile-palette-or-rule-tiles/scripts/RuleTileGenerator.cs +61 -0
- package/unity-skills/create-tile-palette-or-rule-tiles/scripts/TilemapRuleTileCreateFromSegment.cs +225 -0
- package/unity-skills/generate-editor-search-query/SECURITY.md +17 -0
- package/unity-skills/generate-editor-search-query/SKILL.md +117 -0
- package/unity-skills/generate-editor-search-query/references/open-search-window.md +70 -0
- package/unity-skills/generate-editor-search-query/references/query-patterns.md +124 -0
- package/{.claude/skills → unity-skills}/implement-in-app-purchases/SKILL.md +1 -2
- package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/api-notes.md +25 -28
- package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/path-convert-native-google-billing.md +1 -1
- package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/path-implement-iap-d2c.md +40 -5
- package/{.claude/skills → unity-skills}/initialize-ai-navigation/SKILL.md +4 -4
- package/{.claude/skills → unity-skills}/initialize-ai-navigation/references/navigation-system.md +3 -3
- package/{.claude/skills → unity-skills}/levelplay-unity-integration/CHANGELOG.md +12 -0
- package/{.claude/skills → unity-skills}/levelplay-unity-integration/README.md +9 -5
- package/unity-skills/levelplay-unity-integration/SKILL.md +442 -0
- package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/banner-api.md +15 -8
- package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/best-practices.md +604 -536
- package/unity-skills/levelplay-unity-integration/references/dependency-resolution.md +94 -0
- package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/ilrd-api.md +2 -2
- package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/initialization-api.md +221 -0
- package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/interstitial-api.md +11 -3
- package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/ios-setup.md +6 -34
- package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/migration-sdk-9.md +1 -1
- package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/privacy-settings.md +14 -29
- package/{.claude/skills → unity-skills}/levelplay-unity-integration/references/rewarded-api.md +20 -4
- package/unity-skills/levelplay-unity-integration/references/testing-and-validation.md +222 -0
- package/unity-skills/levelplay-unity-integration/references/troubleshooting.md +99 -0
- package/unity-skills/localization/SKILL.md +347 -0
- package/{.claude/skills → unity-skills}/localization/references/api-notes.md +4 -0
- package/unity-skills/localization/resources/L10nBatchProcessor.cs +191 -0
- package/unity-skills/manage-sprite-atlas/SKILL.md +351 -0
- package/unity-skills/manage-sprite-atlas/references/addressables-delivery.md +58 -0
- package/unity-skills/manage-sprite-atlas/references/api.md +382 -0
- package/unity-skills/manage-sprite-atlas/references/best-practices.md +183 -0
- package/unity-skills/manage-sprite-atlas/references/common-errors.md +123 -0
- package/unity-skills/manage-sprite-atlas/references/custom-packing.md +147 -0
- package/unity-skills/manage-sprite-atlas/references/manual-authoring.md +39 -0
- package/unity-skills/manage-sprite-atlas/resources/authoringvsruntime.cs +176 -0
- package/unity-skills/manage-sprite-atlas/resources/buildaddressablespostprocess.cs +59 -0
- package/unity-skills/manage-sprite-atlas/resources/cacheloadedatlases.cs +145 -0
- package/unity-skills/manage-sprite-atlas/resources/cleanupbatchoperations.cs +119 -0
- package/unity-skills/manage-sprite-atlas/resources/createandconfiguremasteratlas.cs +57 -0
- package/unity-skills/manage-sprite-atlas/resources/custompackersetup.cs +88 -0
- package/unity-skills/manage-sprite-atlas/resources/deprecatedmethods.cs +142 -0
- package/unity-skills/manage-sprite-atlas/resources/dontmodifywithoutsaving.cs +120 -0
- package/unity-skills/manage-sprite-atlas/resources/dontpackinruntimebuilds.cs +190 -0
- package/unity-skills/manage-sprite-atlas/resources/dontscriptspriteatlasineditor.cs +114 -0
- package/unity-skills/manage-sprite-atlas/resources/editorconfiguration.cs +95 -0
- package/unity-skills/manage-sprite-atlas/resources/enablespritepacking.cs +172 -0
- package/unity-skills/manage-sprite-atlas/resources/gridspritepacker.cs +50 -0
- package/unity-skills/manage-sprite-atlas/resources/handlelatebinding.cs +147 -0
- package/unity-skills/manage-sprite-atlas/resources/handlenullcases.cs +141 -0
- package/unity-skills/manage-sprite-atlas/resources/migratev1tov2.cs +335 -0
- package/unity-skills/manage-sprite-atlas/resources/multipagepacker.cs +80 -0
- package/unity-skills/manage-sprite-atlas/resources/optimizetexturesettings.cs +191 -0
- package/unity-skills/manage-sprite-atlas/resources/packerdebugging.cs +158 -0
- package/unity-skills/manage-sprite-atlas/resources/packtransform.cs +51 -0
- package/unity-skills/manage-sprite-atlas/resources/platformnames.cs +127 -0
- package/unity-skills/manage-sprite-atlas/resources/queryspritesefficiently.cs +222 -0
- package/unity-skills/manage-sprite-atlas/resources/registercallbacks.cs +152 -0
- package/unity-skills/manage-sprite-atlas/resources/runtimeatlasloader.cs +15 -0
- package/unity-skills/manage-sprite-atlas/resources/runtimespriteaccess.cs +19 -0
- package/unity-skills/manage-sprite-atlas/resources/savespriteatlasasset.cs +107 -0
- package/unity-skills/manage-sprite-atlas/resources/scriptablepacker.cs +81 -0
- package/unity-skills/manage-sprite-atlas/resources/setincludeinbuild.cs +164 -0
- package/unity-skills/manage-sprite-atlas/resources/sizeoptimizedpacker.cs +88 -0
- package/unity-skills/manage-sprite-atlas/resources/spriteatlaslatebinding.cs +123 -0
- package/unity-skills/manage-sprite-atlas/resources/spriteatlasprebuildgenerator.cs +219 -0
- package/unity-skills/manage-sprite-atlas/resources/spritedata.cs +35 -0
- package/unity-skills/manage-sprite-atlas/resources/spritepack.cs +39 -0
- package/unity-skills/manage-sprite-atlas/resources/texturedata.cs +15 -0
- package/unity-skills/manage-sprite-atlas/resources/updatebuildscripts.cs +357 -0
- package/unity-skills/manage-sprite-atlas/resources/updatesettingsconfiguration.cs +135 -0
- package/unity-skills/manage-sprite-atlas/resources/usevariantswisely.cs +179 -0
- package/unity-skills/manage-sprite-atlas/resources/variantatlas.cs +39 -0
- package/unity-skills/manifest.json +1155 -0
- package/unity-skills/migrate-birp-to-urp/SECURITY.md +16 -0
- package/unity-skills/migrate-birp-to-urp/SKILL.md +543 -0
- package/unity-skills/migrate-birp-to-urp/references/capturing-the-editor.md +66 -0
- package/unity-skills/migrate-birp-to-urp/references/complex-shader-situations.md +272 -0
- package/unity-skills/migrate-birp-to-urp/references/custom-shader-triage.md +123 -0
- package/unity-skills/migrate-birp-to-urp/references/implementation-patterns.md +529 -0
- package/unity-skills/migrate-birp-to-urp/references/migration-workflow.md +265 -0
- package/unity-skills/migrate-birp-to-urp/references/quality-settings-map.md +69 -0
- package/unity-skills/new-unity-project/SECURITY.md +26 -0
- package/unity-skills/new-unity-project/SKILL.md +386 -0
- package/unity-skills/new-unity-project/references/skill-setup.md +66 -0
- package/unity-skills/optimize-audio/SECURITY.md +16 -0
- package/{.claude/skills → unity-skills}/optimize-audio/SKILL.md +17 -17
- package/{.claude/skills → unity-skills}/optimize-audio/resources/audio-import-api.md +8 -5
- package/{.claude/skills → unity-skills}/optimize-text-mesh-pro/SKILL.md +1 -11
- package/unity-skills/optimize-web/SECURITY.md +16 -0
- package/{.claude/skills → unity-skills}/optimize-web/SKILL.md +164 -27
- package/unity-skills/optimize-web/scripts/WebOptimizer.cs +46 -0
- package/unity-skills/optimize-web/scripts/toktx-examples.sh +11 -0
- package/{.claude/skills → unity-skills}/physics-3d-collision/SKILL.md +2 -2
- package/unity-skills/physics-3d-collision/references/troubleshooting.md +8 -0
- package/unity-skills/project-auditor-fixes/SKILL.md +64 -0
- package/{.claude/skills → unity-skills}/setup-multiplayer-services/SKILL.md +1 -4
- package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/SKILL.md +1 -1
- package/{.claude/skills → unity-skills}/shader-graph-create-custom-node/SKILL.md +1 -1
- package/unity-skills/sprite-editor/SECURITY.md +16 -0
- package/{.claude/skills → unity-skills}/sprite-editor/SKILL.md +9 -9
- package/{.claude/skills → unity-skills}/sprite-editor/references/templates.md +1 -1
- package/unity-skills/sprite-segment-3x3grid/SKILL.md +136 -0
- package/unity-skills/sprite-segment-3x3grid/scripts/SpriteGridAnalysis.cs +119 -0
- package/{.claude/skills → unity-skills}/ui/SKILL.md +1 -1
- package/{.claude/skills → unity-skills}/ui-imgui/SKILL.md +1 -7
- package/{.claude/skills → unity-skills}/ui-ugui/SKILL.md +3 -9
- package/{.claude/skills → unity-skills}/ui-uitk/SKILL.md +8 -14
- package/{.claude/skills → unity-skills}/ui-uitk/references/custom-elements.md +1 -1
- package/unity-skills/unity-cli/CHANGELOG.md +515 -0
- package/unity-skills/unity-cli/SECURITY.md +68 -0
- package/unity-skills/unity-cli/SKILL.md +723 -0
- package/unity-skills/unity-cli/references/auth-license-cloud.md +318 -0
- package/unity-skills/unity-cli/references/build-run-test.md +555 -0
- package/unity-skills/unity-cli/references/cloud-automation.md +736 -0
- package/{.claude/skills → unity-skills}/unity-cli/references/collaboration.md +166 -105
- package/unity-skills/unity-cli/references/config-hub.md +239 -0
- package/unity-skills/unity-cli/references/diagnostics-maintenance.md +720 -0
- package/unity-skills/unity-cli/references/docs-workflow.md +179 -0
- package/unity-skills/unity-cli/references/editors-install.md +476 -0
- package/unity-skills/unity-cli/references/integration-advanced.md +1130 -0
- package/unity-skills/unity-cli/references/playmode-verification-loop.md +279 -0
- package/unity-skills/unity-cli/references/projects-templates.md +996 -0
- package/unity-skills/unity-cli/references/version-control.md +612 -0
- package/{.claude/skills → unity-skills}/unity-package-management/SKILL.md +60 -12
- package/{.claude/skills → unity-skills}/unity-package-management/references/select-packages.md +39 -21
- package/unity-skills/unity-pipeline/SECURITY.md +17 -0
- package/unity-skills/unity-pipeline/SKILL.md +335 -0
- package/unity-skills/urp-postprocessing/SECURITY.md +16 -0
- package/{.claude/skills → unity-skills}/urp-postprocessing/SKILL.md +12 -12
- package/{.claude/skills → unity-skills}/urp-postprocessing/references/code-templates.md +39 -8
- package/{.claude/skills → unity-skills}/validate-urp-render-graph-renderer-feature/SKILL.md +1 -1
- package/.claude/agents/nccgs-adversarial-reviewer.md +0 -43
- package/.claude/agents/nccgs-engine-programmer.md +0 -27
- package/.claude/agents/nccgs-fast-implementer.md +0 -30
- package/.claude/agents/nccgs-game-designer.md +0 -26
- package/.claude/agents/nccgs-gameplay-programmer.md +0 -26
- package/.claude/agents/nccgs-qa-engineer.md +0 -27
- package/.claude/agents/nccgs-task-scout.md +0 -24
- package/.claude/agents/nccgs-ui-programmer.md +0 -27
- package/.claude/agents/nccgs-unity-build-specialist.md +0 -27
- package/.claude/agents/nccgs-unity-implementer.md +0 -28
- package/.claude/agents/nccgs-unity-systems-specialist.md +0 -27
- package/.claude/agents/nccgs-unity-ui-specialist.md +0 -27
- package/.claude/agents/nccgs-verification-engineer.md +0 -27
- package/.claude/nccgs/MEMORY.md +0 -66
- package/.claude/nccgs/THIRD_PARTY_NOTICES.md +0 -29
- package/.claude/nccgs/VERSION +0 -1
- package/.claude/nccgs/agent-library/nccgs-accessibility-specialist.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-adversarial-reviewer.md +0 -41
- package/.claude/nccgs/agent-library/nccgs-ai-programmer.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-analytics-engineer.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-art-direction-lead.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-audio-direction-lead.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-creative-director.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-documentation-manager.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-economy-designer.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-engine-programmer.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-fast-implementer.md +0 -28
- package/.claude/nccgs/agent-library/nccgs-game-design-lead.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-game-designer.md +0 -24
- package/.claude/nccgs/agent-library/nccgs-gameplay-programmer.md +0 -24
- package/.claude/nccgs/agent-library/nccgs-level-designer.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-live-ops-designer.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-localization-lead.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-narrative-lead.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-network-programmer.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-performance-analyst.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-producer.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-production-coordinator.md +0 -22
- package/.claude/nccgs/agent-library/nccgs-programming-lead.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-prototyper.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-qa-engineer.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-qa-lead.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-release-engineer.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-release-lead.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-security-engineer.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-sound-designer.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-systems-designer.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-task-scout.md +0 -22
- package/.claude/nccgs/agent-library/nccgs-technical-architect.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-technical-artist.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-technical-director.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-tools-programmer.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-ui-programmer.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-unity-build-specialist.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-unity-content-specialist.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-unity-implementer.md +0 -26
- package/.claude/nccgs/agent-library/nccgs-unity-rendering-specialist.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-unity-systems-specialist.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-unity-ui-specialist.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-ux-designer.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-verification-engineer.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-world-builder.md +0 -25
- package/.claude/nccgs/agent-library/nccgs-writer.md +0 -25
- package/.claude/nccgs/constitution.md +0 -187
- package/.claude/nccgs/hooks/agent-audit.mjs +0 -16
- package/.claude/nccgs/hooks/closure-guard.mjs +0 -59
- package/.claude/nccgs/hooks/common.mjs +0 -42
- package/.claude/nccgs/hooks/post-compact.mjs +0 -1
- package/.claude/nccgs/hooks/pre-compact.mjs +0 -8
- package/.claude/nccgs/hooks/protect-git.mjs +0 -22
- package/.claude/nccgs/hooks/protect-write.mjs +0 -17
- package/.claude/nccgs/hooks/runtime-observation.mjs +0 -11
- package/.claude/nccgs/hooks/session-start.mjs +0 -29
- package/.claude/nccgs/hooks/session-stop.mjs +0 -7
- package/.claude/nccgs/hooks/unity-transport-guard.mjs +0 -11
- package/.claude/nccgs/packages/ponytail/README.md +0 -46
- package/.claude/nccgs/packages/ponytail/manifest.json +0 -24
- package/.claude/nccgs/pipeline.json +0 -260
- package/.claude/nccgs/protocols/agent-contract.md +0 -101
- package/.claude/nccgs/protocols/astra-claude.md +0 -111
- package/.claude/nccgs/protocols/bounded-repair.md +0 -246
- package/.claude/nccgs/protocols/context-packets.md +0 -23
- package/.claude/nccgs/protocols/delivery-acceptance.md +0 -105
- package/.claude/nccgs/protocols/design-lifecycle.md +0 -139
- package/.claude/nccgs/protocols/editor-session-evidence.md +0 -52
- package/.claude/nccgs/protocols/evidence.md +0 -31
- package/.claude/nccgs/protocols/model-routing.md +0 -46
- package/.claude/nccgs/protocols/orchestration.md +0 -74
- package/.claude/nccgs/protocols/review-handoff.md +0 -101
- package/.claude/nccgs/protocols/shared-workflow-context.md +0 -33
- package/.claude/nccgs/protocols/standalone-gates.md +0 -329
- package/.claude/nccgs/protocols/standalone-pilot.md +0 -144
- package/.claude/nccgs/protocols/standalone.md +0 -207
- package/.claude/nccgs/protocols/task-autonomy.md +0 -55
- package/.claude/nccgs/protocols/task-gates.md +0 -144
- package/.claude/nccgs/protocols/task-slices.md +0 -106
- package/.claude/nccgs/protocols/unity-boundary.md +0 -31
- package/.claude/nccgs/routing.generated.md +0 -49
- package/.claude/nccgs/settings.fragment.json +0 -213
- package/.claude/nccgs/studio.json +0 -472
- package/.claude/nccgs/tools/approve-overrides.mjs +0 -81
- package/.claude/nccgs/tools/autonomy.mjs +0 -40
- package/.claude/nccgs/tools/command-process.mjs +0 -50
- package/.claude/nccgs/tools/command-tokens.mjs +0 -22
- package/.claude/nccgs/tools/compile-policy.mjs +0 -121
- package/.claude/nccgs/tools/configure-models.mjs +0 -96
- package/.claude/nccgs/tools/criteria.mjs +0 -121
- package/.claude/nccgs/tools/delivery-budget.mjs +0 -52
- package/.claude/nccgs/tools/design-readiness.mjs +0 -158
- package/.claude/nccgs/tools/editor-session-evidence.mjs +0 -66
- package/.claude/nccgs/tools/evidence.mjs +0 -153
- package/.claude/nccgs/tools/gates.mjs +0 -297
- package/.claude/nccgs/tools/handoff.mjs +0 -51
- package/.claude/nccgs/tools/hook-transport.mjs +0 -34
- package/.claude/nccgs/tools/inputs.mjs +0 -108
- package/.claude/nccgs/tools/installation-guard.mjs +0 -55
- package/.claude/nccgs/tools/integrity.mjs +0 -69
- package/.claude/nccgs/tools/lifecycle.mjs +0 -542
- package/.claude/nccgs/tools/native-completion.mjs +0 -30
- package/.claude/nccgs/tools/orchestration.mjs +0 -680
- package/.claude/nccgs/tools/paths.mjs +0 -60
- package/.claude/nccgs/tools/policy.mjs +0 -107
- package/.claude/nccgs/tools/process-lock.mjs +0 -74
- package/.claude/nccgs/tools/repair-packet.mjs +0 -106
- package/.claude/nccgs/tools/returned-handoff.mjs +0 -47
- package/.claude/nccgs/tools/review-budget.mjs +0 -171
- package/.claude/nccgs/tools/review-handoff.mjs +0 -66
- package/.claude/nccgs/tools/runtime.mjs +0 -71
- package/.claude/nccgs/tools/session-budget.mjs +0 -67
- package/.claude/nccgs/tools/shared-context-guard.mjs +0 -60
- package/.claude/nccgs/tools/shared-context.mjs +0 -25
- package/.claude/nccgs/tools/task-slices.mjs +0 -147
- package/.claude/nccgs/tools/task.mjs +0 -145
- package/.claude/nccgs/tools/tool-guard.mjs +0 -120
- package/.claude/nccgs/tools/unity-repair.mjs +0 -128
- package/.claude/nccgs/tools/unity-transport.mjs +0 -170
- package/.claude/nccgs/tools/verification-jobs.mjs +0 -171
- package/.claude/nccgs/tools/verification-worker.mjs +0 -71
- package/.claude/nccgs/tools/windows-compiler-server.cs +0 -163
- package/.claude/nccgs/tools/windows-job.cs +0 -103
- package/.claude/nccgs/unity-skills-manifest.json +0 -727
- package/.claude/nccgs/workflow-catalog.json +0 -654
- package/.claude/rules/nccgs-canonical-docs.md +0 -19
- package/.claude/rules/nccgs-editor-tools.md +0 -12
- package/.claude/rules/nccgs-localization.md +0 -12
- package/.claude/rules/nccgs-networking.md +0 -13
- package/.claude/rules/nccgs-performance.md +0 -14
- package/.claude/rules/nccgs-rendering.md +0 -16
- package/.claude/rules/nccgs-security.md +0 -13
- package/.claude/rules/nccgs-tests.md +0 -18
- package/.claude/rules/nccgs-ui.md +0 -14
- package/.claude/rules/nccgs-unity-assets.md +0 -21
- package/.claude/rules/nccgs-unity-code.md +0 -22
- package/.claude/skills/accessibility-review/SKILL.md +0 -22
- package/.claude/skills/accessibility-review/references/astra.md +0 -17
- package/.claude/skills/accessibility-review/references/legacy.md +0 -7
- package/.claude/skills/architecture-decision/SKILL.md +0 -22
- package/.claude/skills/architecture-decision/references/astra.md +0 -12
- package/.claude/skills/architecture-decision/references/legacy.md +0 -7
- package/.claude/skills/asset-audit/SKILL.md +0 -22
- package/.claude/skills/asset-audit/references/astra.md +0 -17
- package/.claude/skills/asset-audit/references/legacy.md +0 -7
- package/.claude/skills/audit/SKILL.md +0 -22
- package/.claude/skills/audit/references/astra.md +0 -17
- package/.claude/skills/audit/references/dimensions.md +0 -46
- package/.claude/skills/audit/references/legacy.md +0 -9
- package/.claude/skills/balance-review/SKILL.md +0 -22
- package/.claude/skills/balance-review/references/astra.md +0 -17
- package/.claude/skills/balance-review/references/legacy.md +0 -7
- package/.claude/skills/bug-triage/SKILL.md +0 -22
- package/.claude/skills/bug-triage/references/astra.md +0 -27
- package/.claude/skills/bug-triage/references/legacy.md +0 -7
- package/.claude/skills/build-live-game/SKILL.md +0 -317
- package/.claude/skills/build-live-game/references/cloud-code.md +0 -563
- package/.claude/skills/closure/SKILL.md +0 -22
- package/.claude/skills/closure/references/astra.md +0 -15
- package/.claude/skills/closure/references/legacy.md +0 -7
- package/.claude/skills/compatibility-review/SKILL.md +0 -22
- package/.claude/skills/compatibility-review/references/astra.md +0 -17
- package/.claude/skills/compatibility-review/references/legacy.md +0 -7
- package/.claude/skills/context-pack/SKILL.md +0 -22
- package/.claude/skills/context-pack/references/astra.md +0 -12
- package/.claude/skills/context-pack/references/legacy.md +0 -7
- package/.claude/skills/dependency-review/SKILL.md +0 -22
- package/.claude/skills/dependency-review/references/astra.md +0 -17
- package/.claude/skills/dependency-review/references/legacy.md +0 -7
- package/.claude/skills/design/SKILL.md +0 -24
- package/.claude/skills/design/references/astra.md +0 -12
- package/.claude/skills/design/references/legacy.md +0 -13
- package/.claude/skills/design-review/SKILL.md +0 -24
- package/.claude/skills/design-review/references/astra.md +0 -17
- package/.claude/skills/design-review/references/legacy.md +0 -7
- package/.claude/skills/evidence-review/SKILL.md +0 -22
- package/.claude/skills/evidence-review/references/astra.md +0 -17
- package/.claude/skills/evidence-review/references/legacy.md +0 -7
- package/.claude/skills/hotfix/SKILL.md +0 -22
- package/.claude/skills/hotfix/references/astra.md +0 -30
- package/.claude/skills/hotfix/references/legacy.md +0 -7
- package/.claude/skills/incident-recovery/SKILL.md +0 -22
- package/.claude/skills/incident-recovery/references/astra.md +0 -27
- package/.claude/skills/incident-recovery/references/legacy.md +0 -7
- package/.claude/skills/levelplay-unity-integration/SKILL.md +0 -1126
- package/.claude/skills/localization/SKILL.md +0 -135
- package/.claude/skills/localization/resources/L10nBatchProcessor.cs +0 -69
- package/.claude/skills/localize-game/SKILL.md +0 -22
- package/.claude/skills/localize-game/references/astra.md +0 -27
- package/.claude/skills/localize-game/references/legacy.md +0 -7
- package/.claude/skills/migrate-project/SKILL.md +0 -22
- package/.claude/skills/migrate-project/references/astra.md +0 -30
- package/.claude/skills/migrate-project/references/legacy.md +0 -19
- package/.claude/skills/migrate-project/references/procedure.md +0 -96
- package/.claude/skills/milestone-review/SKILL.md +0 -22
- package/.claude/skills/milestone-review/references/astra.md +0 -12
- package/.claude/skills/milestone-review/references/legacy.md +0 -7
- package/.claude/skills/nccgs-code-review/SKILL.md +0 -22
- package/.claude/skills/nccgs-code-review/references/astra.md +0 -21
- package/.claude/skills/nccgs-code-review/references/legacy.md +0 -7
- package/.claude/skills/new-unity-project/SKILL.md +0 -179
- package/.claude/skills/performance-audit/SKILL.md +0 -22
- package/.claude/skills/performance-audit/references/astra.md +0 -17
- package/.claude/skills/performance-audit/references/legacy.md +0 -7
- package/.claude/skills/physics-3d-collision/references/troubleshooting.md +0 -41
- package/.claude/skills/plan-feature/SKILL.md +0 -22
- package/.claude/skills/plan-feature/references/astra.md +0 -12
- package/.claude/skills/plan-feature/references/legacy.md +0 -7
- package/.claude/skills/playtest/SKILL.md +0 -22
- package/.claude/skills/playtest/references/astra.md +0 -31
- package/.claude/skills/playtest/references/legacy.md +0 -7
- package/.claude/skills/project-stage/SKILL.md +0 -22
- package/.claude/skills/project-stage/references/astra.md +0 -12
- package/.claude/skills/project-stage/references/legacy.md +0 -7
- package/.claude/skills/prototype-feature/SKILL.md +0 -22
- package/.claude/skills/prototype-feature/references/astra.md +0 -31
- package/.claude/skills/prototype-feature/references/legacy.md +0 -7
- package/.claude/skills/qa-plan/SKILL.md +0 -22
- package/.claude/skills/qa-plan/references/astra.md +0 -12
- package/.claude/skills/qa-plan/references/legacy.md +0 -7
- package/.claude/skills/release/SKILL.md +0 -22
- package/.claude/skills/release/references/astra.md +0 -30
- package/.claude/skills/release/references/legacy.md +0 -11
- package/.claude/skills/release-readiness/SKILL.md +0 -22
- package/.claude/skills/release-readiness/references/astra.md +0 -17
- package/.claude/skills/release-readiness/references/legacy.md +0 -7
- package/.claude/skills/retrospective/SKILL.md +0 -22
- package/.claude/skills/retrospective/references/astra.md +0 -12
- package/.claude/skills/retrospective/references/legacy.md +0 -7
- package/.claude/skills/review/SKILL.md +0 -22
- package/.claude/skills/review/references/astra.md +0 -21
- package/.claude/skills/review/references/legacy.md +0 -9
- package/.claude/skills/security-audit/SKILL.md +0 -22
- package/.claude/skills/security-audit/references/astra.md +0 -17
- package/.claude/skills/security-audit/references/legacy.md +0 -7
- package/.claude/skills/sprint-plan/SKILL.md +0 -22
- package/.claude/skills/sprint-plan/references/astra.md +0 -12
- package/.claude/skills/sprint-plan/references/legacy.md +0 -7
- package/.claude/skills/status/SKILL.md +0 -22
- package/.claude/skills/status/references/astra.md +0 -19
- package/.claude/skills/status/references/legacy.md +0 -9
- package/.claude/skills/story-readiness/SKILL.md +0 -24
- package/.claude/skills/story-readiness/references/astra.md +0 -17
- package/.claude/skills/story-readiness/references/legacy.md +0 -7
- package/.claude/skills/test/SKILL.md +0 -22
- package/.claude/skills/test/references/astra.md +0 -27
- package/.claude/skills/test/references/legacy.md +0 -9
- package/.claude/skills/ui-review/SKILL.md +0 -22
- package/.claude/skills/ui-review/references/astra.md +0 -17
- package/.claude/skills/ui-review/references/legacy.md +0 -7
- package/.claude/skills/unity-cli/CHANGELOG.md +0 -233
- package/.claude/skills/unity-cli/SECURITY.md +0 -22
- package/.claude/skills/unity-cli/SKILL.md +0 -414
- package/.claude/skills/unity-cli/references/auth-license-cloud.md +0 -146
- package/.claude/skills/unity-cli/references/build-run-test.md +0 -349
- package/.claude/skills/unity-cli/references/config-hub.md +0 -103
- package/.claude/skills/unity-cli/references/diagnostics-maintenance.md +0 -326
- package/.claude/skills/unity-cli/references/editors-install.md +0 -327
- package/.claude/skills/unity-cli/references/integration-advanced.md +0 -472
- package/.claude/skills/unity-cli/references/projects-templates.md +0 -574
- package/.claude/skills/work/SKILL.md +0 -22
- package/.claude/skills/work/references/astra.md +0 -32
- package/.claude/skills/work/references/classification.md +0 -41
- package/.claude/skills/work/references/closure.md +0 -60
- package/.claude/skills/work/references/feature-contracts.md +0 -36
- package/.claude/skills/work/references/legacy.md +0 -29
- package/.claude/skills/work/references/verification.md +0 -26
- package/CLAUDE.md +0 -10
- package/MEMORY.md +0 -109
- package/UPGRADING.md +0 -130
- package/VERSION +0 -1
- package/docs/ARCHITECTURE.md +0 -131
- package/docs/ASSET-PRODUCTION-GRAPHIFY-PLAN.md +0 -230
- package/docs/BOUNDED-REPAIR.md +0 -80
- package/docs/EDITOR-SESSION-EVIDENCE.md +0 -52
- package/docs/HANDOFF-AUTOMATION.md +0 -144
- package/docs/HUONG-DAN-MIGRATE-VA-SU-DUNG.md +0 -117
- package/docs/MIGRATION-MATRIX.md +0 -23
- package/docs/NCCGS-1.3.md +0 -13
- package/docs/NCCGS-1.4.1.md +0 -149
- package/docs/NCCGS-1.4.md +0 -184
- package/docs/NCCGS-1.5-IMPLEMENTATION-PLAN.md +0 -378
- package/docs/NCCGS-1.5-PILOT.md +0 -130
- package/docs/NCCGS-1.5.md +0 -237
- package/docs/PHASE-1-OPERATIONS.md +0 -278
- package/docs/PHASE-2-OPERATIONS.md +0 -183
- package/docs/PROJECT-POLICY.md +0 -94
- package/docs/RELEASE-STATUS.md +0 -150
- package/docs/TASK-SLICING.md +0 -57
- package/docs/UNINSTALL.md +0 -134
- package/docs/UPGRADE-QUALIFICATION.md +0 -45
- package/docs/WFK17-HOOK-REPAIR.md +0 -71
- package/docs/WORKFLOWS.md +0 -85
- package/package-assets/nccgs-project.gitignore +0 -2
- package/package-assets/setup-vivox-voice-chat-evals.gitignore +0 -7
- package/scaffold/.nccgs/autonomy.json +0 -4
- package/scaffold/.nccgs/bugs/.gitkeep +0 -1
- package/scaffold/.nccgs/closures/.gitkeep +0 -1
- package/scaffold/.nccgs/context/.gitkeep +0 -1
- package/scaffold/.nccgs/decisions/.gitkeep +0 -1
- package/scaffold/.nccgs/evidence/.gitkeep +0 -1
- package/scaffold/.nccgs/execution.json +0 -10
- package/scaffold/.nccgs/features/.gitkeep +0 -1
- package/scaffold/.nccgs/gates.json +0 -7
- package/scaffold/.nccgs/inputs.json +0 -6
- package/scaffold/.nccgs/migrations/.gitkeep +0 -1
- package/scaffold/.nccgs/playtests/.gitkeep +0 -1
- package/scaffold/.nccgs/project.yaml +0 -109
- package/scaffold/.nccgs/requirements.yaml +0 -10
- package/scaffold/.nccgs/reviews/.gitkeep +0 -1
- package/scaffold/.nccgs/state.md +0 -40
- package/scaffold/.nccgs/templates/agent-handoff.md +0 -37
- package/scaffold/.nccgs/templates/architecture-decision.md +0 -27
- package/scaffold/.nccgs/templates/closure-record.md +0 -62
- package/scaffold/.nccgs/templates/context-packet.yaml +0 -17
- package/scaffold/.nccgs/templates/design-contract.json +0 -34
- package/scaffold/.nccgs/templates/evidence-record.md +0 -23
- package/scaffold/.nccgs/templates/feature-contract.md +0 -60
- package/scaffold/.nccgs/templates/implementation-report.md +0 -52
- package/scaffold/.nccgs/templates/migration-plan.md +0 -40
- package/scaffold/.nccgs/templates/repair-packet.json +0 -14
- package/scaffold/.nccgs/templates/repair-unity-code.json +0 -18
- package/scaffold/.nccgs/templates/repair-unity-editor.json +0 -21
- package/scaffold/.nccgs/templates/task-slices.json +0 -28
- package/scaffold/.nccgs/templates/waiver.md +0 -11
- package/scripts/benchmark-snapshot.mjs +0 -205
- package/scripts/benchmark-v15.mjs +0 -173
- package/scripts/cli.mjs +0 -205
- package/scripts/doctor.mjs +0 -261
- package/scripts/install.mjs +0 -530
- package/scripts/recover-session.mjs +0 -89
- package/scripts/run.mjs +0 -86
- package/scripts/supervise.mjs +0 -152
- package/scripts/uninstall.mjs +0 -292
- package/scripts/validate.mjs +0 -285
- package/scripts/work-handoff.mjs +0 -38
- package/tests/autonomy.test.mjs +0 -126
- package/tests/benchmark-v15.test.mjs +0 -65
- package/tests/design-readiness.test.mjs +0 -200
- package/tests/editor-session-evidence.test.mjs +0 -45
- package/tests/evidence.test.mjs +0 -186
- package/tests/fixtures/compiler-shutdown.cs +0 -67
- package/tests/fixtures/native-provider.mjs +0 -61
- package/tests/framework.test.mjs +0 -740
- package/tests/gates.test.mjs +0 -479
- package/tests/hook-repair.test.mjs +0 -106
- package/tests/lifecycle-v15.test.mjs +0 -346
- package/tests/native-completion-notices.test.mjs +0 -181
- package/tests/orchestration-v15.test.mjs +0 -596
- package/tests/phase1.test.mjs +0 -427
- package/tests/phase2.test.mjs +0 -250
- package/tests/policy-v15.test.mjs +0 -234
- package/tests/ponytail-package.test.mjs +0 -75
- package/tests/returned-handoff-notices.test.mjs +0 -170
- package/tests/review-budget.test.mjs +0 -177
- package/tests/runtime-v15.test.mjs +0 -1198
- package/tests/session-budget.test.mjs +0 -34
- package/tests/task-slices.test.mjs +0 -285
- package/tests/uninstall.test.mjs +0 -477
- package/tests/unity-generated.test.mjs +0 -140
- package/tests/unity-transport.test.mjs +0 -348
- /package/{.claude/nccgs/packages → template}/ponytail/LICENSE +0 -0
- /package/{.claude/nccgs/packages → template}/ponytail/NOTICE.md +0 -0
- /package/{.claude/nccgs/packages → template}/ponytail/complexity-review.md +0 -0
- /package/{.claude/skills → unity-skills}/build-live-game/references/remote-config.md +0 -0
- /package/{.claude/skills → unity-skills}/implement-in-app-purchases/README.md +0 -0
- /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/codeless-catalog.md +0 -0
- /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/convert-adapty.md +0 -0
- /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/convert-essentialkit.md +0 -0
- /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/convert-revenuecat.md +0 -0
- /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/convert-unipay.md +0 -0
- /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/migration-v4-to-v5.md +0 -0
- /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/path-add-iap-to-new-project.md +0 -0
- /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/path-convert-native-storekit.md +0 -0
- /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/platform-notes.md +0 -0
- /package/{.claude/skills → unity-skills}/implement-in-app-purchases/references/pre-check.md +0 -0
- /package/{.claude/skills → unity-skills}/localization/resources/LocalizedFontAsset.cs +0 -0
- /package/{.claude/skills → unity-skills}/optimize-audio/resources/platform-settings.md +0 -0
- /package/{.claude/skills → unity-skills}/optimize-web/resources/WebOptimizer.cs +0 -0
- /package/{.claude/skills → unity-skills}/optimize-web/resources/toktx-examples.sh +0 -0
- /package/{.claude/skills → unity-skills}/physics-3d-collision/resources/CollisionDebugger.cs +0 -0
- /package/{.claude/skills → unity-skills}/setup-multiplayer-services/references/dgs-entrypoint.md +0 -0
- /package/{.claude/skills → unity-skills}/setup-multiplayer-services/references/entrypoints.md +0 -0
- /package/{.claude/skills → unity-skills}/setup-multiplayer-services/references/examples.md +0 -0
- /package/{.claude/skills → unity-skills}/setup-multiplayer-services/references/implementation-fit.md +0 -0
- /package/{.claude/skills → unity-skills}/setup-multiplayer-services/references/underlying-services.md +0 -0
- /package/{.claude/skills → unity-skills}/setup-multiplayer-services/references/workflows-prerequisites.md +0 -0
- /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/evals/.env.example +0 -0
- /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/evals/README.md +0 -0
- /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/evals/promptfooconfig.yaml +0 -0
- /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/evals/tests/init-and-login.yaml +0 -0
- /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/evals/tests/text-chat.yaml +0 -0
- /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/evals/tests/voice-channels.yaml +0 -0
- /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/references/events-and-participants.md +0 -0
- /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/references/init-and-login.md +0 -0
- /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/references/text-chat.md +0 -0
- /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/references/troubleshooting.md +0 -0
- /package/{.claude/skills → unity-skills}/setup-vivox-voice-chat/references/voice-channels.md +0 -0
- /package/{.claude/skills → unity-skills}/shader-graph-create-custom-node/resources/all_hints.hlsl +0 -0
- /package/{.claude/skills → unity-skills}/sprite-editor/references/api_reference.md +0 -0
- /package/{.claude/skills → unity-skills}/sprite-editor/references/background.md +0 -0
- /package/{.claude/skills → unity-skills}/sprite-editor/scripts/AutomaticSliceTexture.cs +0 -0
- /package/{.claude/skills → unity-skills}/sprite-editor/scripts/GenerateNewSpriteRects.cs +0 -0
- /package/{.claude/skills → unity-skills}/sprite-editor/scripts/GetTextureSourceImageSize.cs +0 -0
- /package/{.claude/skills → unity-skills}/sprite-editor/scripts/GetTextureToSlice.cs +0 -0
- /package/{.claude/skills → unity-skills}/sprite-editor/scripts/GridSliceTexture.cs +0 -0
- /package/{.claude/skills → unity-skills}/sprite-editor/scripts/IsometricSliceTexture.cs +0 -0
- /package/{.claude/skills → unity-skills}/sprite-editor/scripts/README.md +0 -0
- /package/{.claude/skills → unity-skills}/sprite-editor/scripts/SetPivotExample.cs +0 -0
- /package/{.claude/skills → unity-skills}/sprite-editor/scripts/SpriteToPng.cs +0 -0
- /package/{.claude/skills → unity-skills}/ui-imgui/references/gui-elements.md +0 -0
- /package/{.claude/skills → unity-skills}/ui-imgui/references/templates.md +0 -0
- /package/{.claude/skills → unity-skills}/ui-ugui/references/scrollview-setup.md +0 -0
- /package/{.claude/skills → unity-skills}/ui-uitk/references/common-issues.md +0 -0
- /package/{.claude/skills → unity-skills}/ui-uitk/references/painter2d.md +0 -0
- /package/{.claude/skills → unity-skills}/ui-uitk/references/pointermanipulator-guide.md +0 -0
- /package/{.claude/skills → unity-skills}/ui-uitk/references/svg-icons.md +0 -0
- /package/{.claude/skills → unity-skills}/ui-uitk/references/ui-runtime-binding.md +0 -0
- /package/{.claude/skills → unity-skills}/ui-uitk/references/uss-guide.md +0 -0
- /package/{.claude/skills → unity-skills}/urp-postprocessing/references/effect-reference.md +0 -0
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- [API Notes](#api-notes)
|
|
10
10
|
- [Namespace Aliases](#namespace-aliases-required)
|
|
11
11
|
- [ProtectedReadAccessClassOptions](#protectedreadaccessclassoptions)
|
|
12
|
-
- [Why
|
|
12
|
+
- [Why Tier Thresholds Live in the Module](#why-tier-thresholds-live-in-the-module)
|
|
13
13
|
- [Source Whitelist Enforcement](#source-whitelist-enforcement)
|
|
14
14
|
- [Error Handling](#error-handling)
|
|
15
15
|
- [Cloud Code Module Functions](#cloud-code-module-functions)
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
| Per-player progress | Cloud Save (Protected) | `"battle_pass_progress"` |
|
|
37
37
|
| Award XP | Cloud Code | `BattlePassModule.AwardXp` |
|
|
38
38
|
| Claim reward | Cloud Code | `BattlePassModule.ClaimReward` |
|
|
39
|
-
| Purchase premium | Cloud Code | `BattlePassModule.PurchasePremium` |
|
|
39
|
+
| Purchase premium | Cloud Code | `BattlePassModule.PurchasePremium` (integration stub; always throws until you add purchase validation) |
|
|
40
40
|
|
|
41
41
|
```
|
|
42
42
|
Remote Config Cloud Save (Protected) Cloud Code Module
|
|
@@ -108,31 +108,11 @@ public class BattlePassTier
|
|
|
108
108
|
}
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
### BattlePassProgress (
|
|
111
|
+
### BattlePassProgress (defined once, in the cloud assembly)
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
[Serializable]
|
|
115
|
-
public class BattlePassProgress
|
|
116
|
-
{
|
|
117
|
-
public int CurrentXp;
|
|
118
|
-
public int CurrentTier;
|
|
119
|
-
public bool HasPremium;
|
|
120
|
-
public List<string> ClaimedRewards; // e.g. "tier_1_free", "tier_2_premium"
|
|
121
|
-
}
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
One entry per pass, keyed by `PassId` in the progress dictionary stored at Cloud Save key `"battle_pass_progress"`.
|
|
113
|
+
Stored in Cloud Save Protected, one entry per pass, keyed by `PassId` in the progress dictionary at Cloud Save key `"battle_pass_progress"`. Define it once, in `BattlePassModule.cs` (see [Server-Side Models](#server-side-models-inside-battlepassmodulecs)), as a class of public settable members. The source generator emits a data-only stub of the same name and namespace, `BattlePassModule.Cloud.BattlePassProgress`, into the client assembly, so client code uses that type and never declares its own copy. `ClaimedRewards` holds keys such as `"tier_1_free"` and `"tier_2_premium"`.
|
|
125
114
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
```csharp
|
|
129
|
-
[Serializable]
|
|
130
|
-
public class BattlePassTierThreshold
|
|
131
|
-
{
|
|
132
|
-
public int TierNumber;
|
|
133
|
-
public int XpRequired;
|
|
134
|
-
}
|
|
135
|
-
```
|
|
115
|
+
`BattlePassTierThreshold` is a server-only helper that mirrors the `Tiers` in `BattlePasses.rc`. It never appears in an endpoint signature, so it has no client stub.
|
|
136
116
|
|
|
137
117
|
---
|
|
138
118
|
|
|
@@ -161,31 +141,35 @@ player's data.
|
|
|
161
141
|
> instead of `ProtectedReadAccessClassOptions`) will return no data, because the progress
|
|
162
142
|
> is stored in the Protected bucket by the Cloud Code module.
|
|
163
143
|
|
|
164
|
-
### Why
|
|
165
|
-
|
|
166
|
-
Remote Config is not accessible from inside Cloud Code modules. The client serializes the tier
|
|
167
|
-
thresholds from the loaded `BattlePassDefinition` and sends them as the `tiersJson` parameter.
|
|
168
|
-
The server uses these thresholds to recalculate the player's current tier after awarding XP.
|
|
144
|
+
### Why Tier Thresholds Live in the Module
|
|
169
145
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
146
|
+
Remote Config is not accessible from inside Cloud Code modules, and anything the client sends is
|
|
147
|
+
untrusted: a client that supplies its own tier thresholds can set a tier-three threshold of zero
|
|
148
|
+
and reach tier three with 1 XP. The module therefore holds the thresholds in a server-side
|
|
149
|
+
constant (`PassTiers` in `BattlePassModule.cs`) and `AwardXp` takes no tier data from the client.
|
|
150
|
+
Pass dates get the same treatment: `PassWindows` holds each pass's UTC start and end, and `AwardXp`
|
|
151
|
+
and `ClaimReward` reject any pass outside `[Start, End)` using server time, so an expired pass cannot
|
|
152
|
+
gain XP and a staged future pass cannot be claimed early. Rewards must be claimed while the pass is
|
|
153
|
+
active. Keep `PassTiers` and `PassWindows` in sync with the `XpRequired`, `StartDate` and `EndDate`
|
|
154
|
+
values in `BattlePasses.rc` whenever you change a pass. Passes missing from either are rejected.
|
|
173
155
|
|
|
174
156
|
### Source Whitelist Enforcement
|
|
175
157
|
|
|
176
158
|
The Cloud Code module maintains a server-side whitelist of allowed XP source strings:
|
|
177
159
|
|
|
178
160
|
```csharp
|
|
179
|
-
static readonly
|
|
161
|
+
static readonly Dictionary<string, int> MaxXpPerSource = new()
|
|
180
162
|
{
|
|
181
|
-
"match_complete",
|
|
182
|
-
"daily_login",
|
|
183
|
-
"quest_complete"
|
|
163
|
+
["match_complete"] = 200,
|
|
164
|
+
["daily_login"] = 50,
|
|
165
|
+
["quest_complete"] = 300
|
|
184
166
|
};
|
|
185
167
|
```
|
|
186
168
|
|
|
187
|
-
Any `AwardXp` call with an unrecognized source throws an exception
|
|
188
|
-
|
|
169
|
+
Any `AwardXp` call with an unrecognized source throws an exception, and each source has a
|
|
170
|
+
per-call XP cap (`MaxXpPerSource`). Add or remove entries as needed for your game. The whitelist
|
|
171
|
+
and caps prevent clients from inventing XP sources or awarding themselves arbitrary amounts.
|
|
172
|
+
For full protection, derive XP from server-verified events instead of a client-supplied `amount`.
|
|
189
173
|
|
|
190
174
|
### Error Handling
|
|
191
175
|
|
|
@@ -210,15 +194,20 @@ catch (CloudSaveException ex)
|
|
|
210
194
|
}
|
|
211
195
|
```
|
|
212
196
|
|
|
197
|
+
| Error | Cause | Fix |
|
|
198
|
+
| :-- | :-- | :-- |
|
|
199
|
+
| `CloudCodeException` with reason `ScriptError` | The module threw, for example on a failed validation | Read `ex.Message`, then correct the arguments or the player's state |
|
|
200
|
+
| `CloudSaveException` with a `403` | The client attempted a direct write to the Protected bucket | Route the write through the Cloud Code module |
|
|
201
|
+
|
|
213
202
|
---
|
|
214
203
|
|
|
215
204
|
## Cloud Code Module Functions
|
|
216
205
|
|
|
217
206
|
| Function | Parameters | Behavior |
|
|
218
207
|
|---|---|---|
|
|
219
|
-
| `AwardXp` | `passId`, `amount`, `source
|
|
220
|
-
| `ClaimReward` | `passId`, `tierNumber`, `rewardType` | Validates the
|
|
221
|
-
| `PurchasePremium` | `passId` |
|
|
208
|
+
| `AwardXp` | `passId`, `amount`, `source` | Validates `source` against a whitelist (`MaxXpPerSource` keys), rejects non-positive amounts and amounts above the source's cap, rejects unknown passes, adds XP to the pass progress, recalculates the current tier from the server-side `PassTiers`, saves to Cloud Save Protected |
|
|
209
|
+
| `ClaimReward` | `passId`, `tierNumber`, `rewardType` | Validates the tier exists in the server-side `PassTiers` and the player's XP meets its threshold, validates premium ownership if `rewardType` is `"premium"`, checks reward is not already claimed, records the claim as `"tier_N_type"` (e.g. `"tier_2_premium"`), saves to Cloud Save Protected |
|
|
210
|
+
| `PurchasePremium` | `passId` | **Integration stub.** Returns the existing progress if `HasPremium` is already true; otherwise the sample always throws, because nothing in the blueprint sets `HasPremium`. Add server-side purchase validation that sets `HasPremium = true` before premium purchasing works; do not deploy this path as-is. It fails closed and never grants premium unverified. |
|
|
222
211
|
|
|
223
212
|
All three functions return the updated `BattlePassProgress` for the given pass.
|
|
224
213
|
|
|
@@ -292,26 +281,18 @@ async Task<Dictionary<string, BattlePassProgress>> LoadProgressAsync()
|
|
|
292
281
|
```csharp
|
|
293
282
|
public async Task<BattlePassProgress> AwardXpAsync(string passId, int amount, string source)
|
|
294
283
|
{
|
|
295
|
-
|
|
296
|
-
|
|
284
|
+
if (!ActivePasses.Any(p => p.PassId == passId))
|
|
285
|
+
throw new InvalidOperationException(
|
|
297
286
|
$"Pass '{passId}' is not in the active passes list. Call LoadAsync first.");
|
|
298
287
|
|
|
299
|
-
var progress = await
|
|
300
|
-
"BattlePassModule", "AwardXp",
|
|
301
|
-
new Dictionary<string, object>
|
|
302
|
-
{
|
|
303
|
-
{ "passId", passId },
|
|
304
|
-
{ "amount", amount },
|
|
305
|
-
{ "source", source },
|
|
306
|
-
{ "tiersJson", JsonConvert.SerializeObject(pass.Tiers) }
|
|
307
|
-
});
|
|
288
|
+
var progress = await m_Client.AwardXp(passId, amount, source);
|
|
308
289
|
|
|
309
290
|
Progress[passId] = progress;
|
|
310
291
|
return progress;
|
|
311
292
|
}
|
|
312
293
|
```
|
|
313
294
|
|
|
314
|
-
The
|
|
295
|
+
The client sends no tier data; the server recalculates the player's tier from its own `PassTiers`. The active-pass check above is UX only; the module enforces pass dates itself. `m_Client` is the generated `BattlePassModuleClient`, created after sign-in.
|
|
315
296
|
|
|
316
297
|
### ClaimRewardAsync
|
|
317
298
|
|
|
@@ -319,14 +300,7 @@ The `tiersJson` parameter is the serialized tier list from the locally loaded pa
|
|
|
319
300
|
public async Task<BattlePassProgress> ClaimRewardAsync(
|
|
320
301
|
string passId, int tierNumber, string rewardType)
|
|
321
302
|
{
|
|
322
|
-
var progress = await
|
|
323
|
-
"BattlePassModule", "ClaimReward",
|
|
324
|
-
new Dictionary<string, object>
|
|
325
|
-
{
|
|
326
|
-
{ "passId", passId },
|
|
327
|
-
{ "tierNumber", tierNumber },
|
|
328
|
-
{ "rewardType", rewardType }
|
|
329
|
-
});
|
|
303
|
+
var progress = await m_Client.ClaimReward(passId, tierNumber, rewardType);
|
|
330
304
|
|
|
331
305
|
Progress[passId] = progress;
|
|
332
306
|
return progress;
|
|
@@ -335,12 +309,12 @@ public async Task<BattlePassProgress> ClaimRewardAsync(
|
|
|
335
309
|
|
|
336
310
|
### PurchasePremiumAsync
|
|
337
311
|
|
|
312
|
+
Calls the `PurchasePremium` integration stub. It throws for any player without `HasPremium` until you add a validated purchase flow to the module.
|
|
313
|
+
|
|
338
314
|
```csharp
|
|
339
315
|
public async Task<BattlePassProgress> PurchasePremiumAsync(string passId)
|
|
340
316
|
{
|
|
341
|
-
var progress = await
|
|
342
|
-
"BattlePassModule", "PurchasePremium",
|
|
343
|
-
new Dictionary<string, object> { { "passId", passId } });
|
|
317
|
+
var progress = await m_Client.PurchasePremium(passId);
|
|
344
318
|
|
|
345
319
|
Progress[passId] = progress;
|
|
346
320
|
return progress;
|
|
@@ -359,9 +333,10 @@ using System.Collections.Generic;
|
|
|
359
333
|
using System.Globalization;
|
|
360
334
|
using System.Linq;
|
|
361
335
|
using System.Threading.Tasks;
|
|
336
|
+
using BattlePassModule.Client;
|
|
337
|
+
using BattlePassModule.Cloud;
|
|
362
338
|
using Newtonsoft.Json;
|
|
363
339
|
using Unity.Services.Authentication;
|
|
364
|
-
using Unity.Services.CloudCode;
|
|
365
340
|
using Unity.Services.CloudSave;
|
|
366
341
|
using Unity.Services.CloudSave.Models;
|
|
367
342
|
using Unity.Services.CloudSave.Models.Data.Player;
|
|
@@ -372,6 +347,8 @@ using UnityEngine;
|
|
|
372
347
|
|
|
373
348
|
public class BattlePassManager : MonoBehaviour
|
|
374
349
|
{
|
|
350
|
+
BattlePassModuleClient m_Client;
|
|
351
|
+
|
|
375
352
|
public List<BattlePassDefinition> ActivePasses { get; private set; } = new();
|
|
376
353
|
public Dictionary<string, BattlePassProgress> Progress { get; private set; } = new();
|
|
377
354
|
|
|
@@ -386,6 +363,7 @@ public class BattlePassManager : MonoBehaviour
|
|
|
386
363
|
{
|
|
387
364
|
await AuthenticationService.Instance.SignInAnonymouslyAsync();
|
|
388
365
|
}
|
|
366
|
+
m_Client = new BattlePassModuleClient();
|
|
389
367
|
await LoadAsync();
|
|
390
368
|
Debug.Log($"BattlePassManager: Loaded {ActivePasses.Count} passes.");
|
|
391
369
|
Loaded?.Invoke();
|
|
@@ -439,19 +417,11 @@ public class BattlePassManager : MonoBehaviour
|
|
|
439
417
|
|
|
440
418
|
public async Task<BattlePassProgress> AwardXpAsync(string passId, int amount, string source)
|
|
441
419
|
{
|
|
442
|
-
|
|
443
|
-
|
|
420
|
+
if (!ActivePasses.Any(p => p.PassId == passId))
|
|
421
|
+
throw new InvalidOperationException(
|
|
444
422
|
$"Pass '{passId}' is not in the active passes list. Call LoadAsync first.");
|
|
445
423
|
|
|
446
|
-
var progress = await
|
|
447
|
-
"BattlePassModule", "AwardXp",
|
|
448
|
-
new Dictionary<string, object>
|
|
449
|
-
{
|
|
450
|
-
{ "passId", passId },
|
|
451
|
-
{ "amount", amount },
|
|
452
|
-
{ "source", source },
|
|
453
|
-
{ "tiersJson", JsonConvert.SerializeObject(pass.Tiers) }
|
|
454
|
-
});
|
|
424
|
+
var progress = await m_Client.AwardXp(passId, amount, source);
|
|
455
425
|
|
|
456
426
|
Progress[passId] = progress;
|
|
457
427
|
return progress;
|
|
@@ -460,24 +430,16 @@ public class BattlePassManager : MonoBehaviour
|
|
|
460
430
|
public async Task<BattlePassProgress> ClaimRewardAsync(
|
|
461
431
|
string passId, int tierNumber, string rewardType)
|
|
462
432
|
{
|
|
463
|
-
var progress = await
|
|
464
|
-
"BattlePassModule", "ClaimReward",
|
|
465
|
-
new Dictionary<string, object>
|
|
466
|
-
{
|
|
467
|
-
{ "passId", passId },
|
|
468
|
-
{ "tierNumber", tierNumber },
|
|
469
|
-
{ "rewardType", rewardType }
|
|
470
|
-
});
|
|
433
|
+
var progress = await m_Client.ClaimReward(passId, tierNumber, rewardType);
|
|
471
434
|
|
|
472
435
|
Progress[passId] = progress;
|
|
473
436
|
return progress;
|
|
474
437
|
}
|
|
475
438
|
|
|
439
|
+
// Requires the PurchasePremium integration stub to be completed server-side.
|
|
476
440
|
public async Task<BattlePassProgress> PurchasePremiumAsync(string passId)
|
|
477
441
|
{
|
|
478
|
-
var progress = await
|
|
479
|
-
"BattlePassModule", "PurchasePremium",
|
|
480
|
-
new Dictionary<string, object> { { "passId", passId } });
|
|
442
|
+
var progress = await m_Client.PurchasePremium(passId);
|
|
481
443
|
|
|
482
444
|
Progress[passId] = progress;
|
|
483
445
|
return progress;
|
|
@@ -556,15 +518,28 @@ public class BattlePassTester : MonoBehaviour
|
|
|
556
518
|
|
|
557
519
|
## Cloud Code Module Implementation
|
|
558
520
|
|
|
559
|
-
> **
|
|
560
|
-
>
|
|
561
|
-
>
|
|
521
|
+
> **Create the module with the Editor, not by hand.** Right-click a folder under `Assets/` ->
|
|
522
|
+
> **Create > Services > Cloud Code Module Script** and name it `BattlePassModule`. See
|
|
523
|
+
> the Creating a Cloud Code Module section of `references/cloud-code-modules.md`.
|
|
562
524
|
>
|
|
563
|
-
>
|
|
564
|
-
>
|
|
565
|
-
>
|
|
566
|
-
> - [ ] `
|
|
567
|
-
> - [ ] `
|
|
525
|
+
> The Editor generates the following. Use the list to check what you got — there is nothing here to
|
|
526
|
+
> type out, and no `.sln`, `.csproj`, `.pubxml` or test project:
|
|
527
|
+
>
|
|
528
|
+
> - [ ] `Assets/CloudCode/BattlePassModule/BattlePassModule.ccmu` (holds the two asmdef GUIDs)
|
|
529
|
+
> - [ ] `Cloud/BattlePassModule.asmdef` — Editor-only, `noEngineReferences`, `autoReferenced: false`
|
|
530
|
+
> - [ ] `Cloud/BattlePassModule.cs` — rename/replace with the `[CloudCodeFunction]` endpoints below
|
|
531
|
+
> - [ ] `Client/BattlePassModuleClient.asmdef` — references the cloud assembly
|
|
532
|
+
> - [ ] `Client/BattlePassModuleClient.cs` — `[CloudModuleClient(typeof(BattlePassModule))]` partial
|
|
533
|
+
>
|
|
534
|
+
> One file the Editor does **not** generate, which this module needs because its endpoints inject
|
|
535
|
+
> `IGameApiClient`:
|
|
536
|
+
>
|
|
537
|
+
> - [ ] `Cloud/CloudSetup.cs` — an `ICloudCodeSetup` calling `config.AddGameApiClient()`
|
|
538
|
+
> - [ ] `Newtonsoft.Json.dll` added to `precompiledReferences` in `Cloud/BattlePassModule.asmdef` — the generated asmdef ships that array empty, and this module's code uses `JsonConvert` (see `references/cloud-code-modules.md`)
|
|
539
|
+
>
|
|
540
|
+
> The deployed module name is the **cloud asmdef's name** (`BattlePassModule`), not the `.ccmu` filename.
|
|
541
|
+
>
|
|
542
|
+
> The client calls the module through the generated `BattlePassModuleClient`. The assembly that holds `BattlePassManager` must reference the module's client assembly; the Editor creates it auto-referenced, so the default game assembly already does.
|
|
568
543
|
|
|
569
544
|
### BattlePassModule.cs
|
|
570
545
|
|
|
@@ -578,157 +553,208 @@ using Unity.Services.CloudCode.Apis;
|
|
|
578
553
|
using Unity.Services.CloudCode.Core;
|
|
579
554
|
using Unity.Services.CloudSave.Model;
|
|
580
555
|
|
|
581
|
-
|
|
556
|
+
namespace BattlePassModule.Cloud
|
|
582
557
|
{
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
static readonly HashSet<string> ValidSources = new()
|
|
558
|
+
public class BattlePassModule
|
|
586
559
|
{
|
|
587
|
-
"
|
|
588
|
-
"daily_login",
|
|
589
|
-
"quest_complete"
|
|
590
|
-
};
|
|
560
|
+
const string ProgressKey = "battle_pass_progress";
|
|
591
561
|
|
|
592
|
-
|
|
562
|
+
static readonly Dictionary<string, int> MaxXpPerSource = new()
|
|
563
|
+
{
|
|
564
|
+
["match_complete"] = 200,
|
|
565
|
+
["daily_login"] = 50,
|
|
566
|
+
["quest_complete"] = 300
|
|
567
|
+
};
|
|
593
568
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
569
|
+
// Keep in sync with the Tiers in BattlePasses.rc; clients are never trusted for thresholds.
|
|
570
|
+
static readonly Dictionary<string, List<BattlePassTierThreshold>> PassTiers = new()
|
|
571
|
+
{
|
|
572
|
+
["season_03"] = new()
|
|
573
|
+
{
|
|
574
|
+
new BattlePassTierThreshold { TierNumber = 1, XpRequired = 0 },
|
|
575
|
+
new BattlePassTierThreshold { TierNumber = 2, XpRequired = 500 },
|
|
576
|
+
new BattlePassTierThreshold { TierNumber = 3, XpRequired = 1200 }
|
|
577
|
+
},
|
|
578
|
+
["easter_2026"] = new()
|
|
579
|
+
{
|
|
580
|
+
new BattlePassTierThreshold { TierNumber = 1, XpRequired = 0 },
|
|
581
|
+
new BattlePassTierThreshold { TierNumber = 2, XpRequired = 300 }
|
|
582
|
+
}
|
|
583
|
+
};
|
|
602
584
|
|
|
603
|
-
|
|
604
|
-
|
|
585
|
+
// Keep in sync with StartDate/EndDate in BattlePasses.rc. UTC, End is exclusive.
|
|
586
|
+
static readonly Dictionary<string, (DateTime Start, DateTime End)> PassWindows = new()
|
|
587
|
+
{
|
|
588
|
+
["season_03"] = (new DateTime(2024, 1, 1, 0, 0, 0, DateTimeKind.Utc),
|
|
589
|
+
new DateTime(2026, 7, 1, 0, 0, 0, DateTimeKind.Utc)),
|
|
590
|
+
["easter_2026"] = (new DateTime(2026, 4, 1, 0, 0, 0, DateTimeKind.Utc),
|
|
591
|
+
new DateTime(2026, 4, 22, 0, 0, 0, DateTimeKind.Utc))
|
|
592
|
+
};
|
|
593
|
+
|
|
594
|
+
// ── AwardXp ──────────────────────────────────────────────────────────────
|
|
595
|
+
|
|
596
|
+
[CloudCodeFunction("AwardXp")]
|
|
597
|
+
public async Task<BattlePassProgress> AwardXp(
|
|
598
|
+
[CloudCodeService] IExecutionContext context, [CloudCodeService] IGameApiClient client,
|
|
599
|
+
string passId, int amount, string source)
|
|
600
|
+
{
|
|
601
|
+
if (!MaxXpPerSource.TryGetValue(source, out var maxXp))
|
|
602
|
+
throw new Exception(
|
|
603
|
+
$"Invalid XP source: '{source}'. Allowed: {string.Join(", ", MaxXpPerSource.Keys)}");
|
|
605
604
|
|
|
606
|
-
|
|
605
|
+
if (amount <= 0 || amount > maxXp)
|
|
606
|
+
throw new Exception($"XP amount must be between 1 and {maxXp} for source '{source}'.");
|
|
607
607
|
|
|
608
|
-
|
|
609
|
-
|
|
608
|
+
if (!PassTiers.TryGetValue(passId, out var tiers))
|
|
609
|
+
throw new Exception($"Unknown pass '{passId}'.");
|
|
610
610
|
|
|
611
|
-
|
|
611
|
+
RequireActive(passId);
|
|
612
612
|
|
|
613
|
-
|
|
614
|
-
?? throw new Exception("tiersJson could not be deserialized.");
|
|
615
|
-
progress.CurrentTier = CalculateTier(progress.CurrentXp, tiers);
|
|
613
|
+
var allProgress = await LoadProgressAsync(context, client);
|
|
616
614
|
|
|
617
|
-
|
|
618
|
-
|
|
615
|
+
if (!allProgress.TryGetValue(passId, out var progress))
|
|
616
|
+
progress = new BattlePassProgress { CurrentTier = 1, ClaimedRewards = new List<string>() };
|
|
619
617
|
|
|
620
|
-
|
|
621
|
-
}
|
|
618
|
+
progress.CurrentXp += amount;
|
|
622
619
|
|
|
623
|
-
|
|
620
|
+
progress.CurrentTier = CalculateTier(progress.CurrentXp, tiers);
|
|
624
621
|
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
IExecutionContext context, IGameApiClient client,
|
|
628
|
-
string passId, int tierNumber, string rewardType)
|
|
629
|
-
{
|
|
630
|
-
if (rewardType != "free" && rewardType != "premium")
|
|
631
|
-
throw new Exception(
|
|
632
|
-
$"Invalid rewardType: '{rewardType}'. Must be 'free' or 'premium'.");
|
|
622
|
+
allProgress[passId] = progress;
|
|
623
|
+
await SaveProgressAsync(context, client, allProgress);
|
|
633
624
|
|
|
634
|
-
|
|
625
|
+
return progress;
|
|
626
|
+
}
|
|
635
627
|
|
|
636
|
-
|
|
637
|
-
throw new Exception($"No progress found for pass '{passId}'. Award XP first.");
|
|
628
|
+
// ── ClaimReward ──────────────────────────────────────────────────────────
|
|
638
629
|
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
630
|
+
[CloudCodeFunction("ClaimReward")]
|
|
631
|
+
public async Task<BattlePassProgress> ClaimReward(
|
|
632
|
+
[CloudCodeService] IExecutionContext context, [CloudCodeService] IGameApiClient client,
|
|
633
|
+
string passId, int tierNumber, string rewardType)
|
|
634
|
+
{
|
|
635
|
+
if (rewardType != "free" && rewardType != "premium")
|
|
636
|
+
throw new Exception(
|
|
637
|
+
$"Invalid rewardType: '{rewardType}'. Must be 'free' or 'premium'.");
|
|
642
638
|
|
|
643
|
-
|
|
644
|
-
throw new Exception("Premium pass not owned. Purchase premium first.");
|
|
639
|
+
RequireActive(passId);
|
|
645
640
|
|
|
646
|
-
|
|
647
|
-
if (progress.ClaimedRewards.Contains(rewardKey))
|
|
648
|
-
throw new Exception($"Reward '{rewardKey}' already claimed.");
|
|
641
|
+
var allProgress = await LoadProgressAsync(context, client);
|
|
649
642
|
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
await SaveProgressAsync(context, client, allProgress);
|
|
643
|
+
if (!allProgress.TryGetValue(passId, out var progress))
|
|
644
|
+
throw new Exception($"No progress found for pass '{passId}'. Award XP first.");
|
|
653
645
|
|
|
654
|
-
|
|
655
|
-
|
|
646
|
+
if (!PassTiers.TryGetValue(passId, out var tiers))
|
|
647
|
+
throw new Exception($"Unknown pass '{passId}'.");
|
|
656
648
|
|
|
657
|
-
|
|
649
|
+
var tier = tiers.FirstOrDefault(t => t.TierNumber == tierNumber)
|
|
650
|
+
?? throw new Exception($"Tier {tierNumber} does not exist in pass '{passId}'.");
|
|
658
651
|
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
{
|
|
663
|
-
var allProgress = await LoadProgressAsync(context, client);
|
|
652
|
+
if (progress.CurrentXp < tier.XpRequired)
|
|
653
|
+
throw new Exception(
|
|
654
|
+
$"Tier {tierNumber} not yet reached ({progress.CurrentXp}/{tier.XpRequired} XP).");
|
|
664
655
|
|
|
665
|
-
|
|
666
|
-
|
|
656
|
+
if (rewardType == "premium" && !progress.HasPremium)
|
|
657
|
+
throw new Exception("Premium pass not owned. Purchase premium first.");
|
|
667
658
|
|
|
668
|
-
|
|
669
|
-
|
|
659
|
+
var rewardKey = $"tier_{tierNumber}_{rewardType}";
|
|
660
|
+
if (progress.ClaimedRewards.Contains(rewardKey))
|
|
661
|
+
throw new Exception($"Reward '{rewardKey}' already claimed.");
|
|
670
662
|
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
663
|
+
progress.ClaimedRewards.Add(rewardKey);
|
|
664
|
+
allProgress[passId] = progress;
|
|
665
|
+
await SaveProgressAsync(context, client, allProgress);
|
|
674
666
|
|
|
675
|
-
|
|
676
|
-
|
|
667
|
+
return progress;
|
|
668
|
+
}
|
|
677
669
|
|
|
678
|
-
|
|
670
|
+
// ── PurchasePremium ──────────────────────────────────────────────────────
|
|
679
671
|
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
.FirstOrDefault();
|
|
672
|
+
[CloudCodeFunction("PurchasePremium")]
|
|
673
|
+
public async Task<BattlePassProgress> PurchasePremium(
|
|
674
|
+
[CloudCodeService] IExecutionContext context, [CloudCodeService] IGameApiClient client, string passId)
|
|
675
|
+
{
|
|
676
|
+
var allProgress = await LoadProgressAsync(context, client);
|
|
686
677
|
|
|
687
|
-
|
|
688
|
-
|
|
678
|
+
if (!allProgress.TryGetValue(passId, out var progress))
|
|
679
|
+
progress = new BattlePassProgress { CurrentTier = 1, ClaimedRewards = new List<string>() };
|
|
689
680
|
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
{
|
|
693
|
-
var result = await client.CloudSaveData.GetProtectedItemsAsync(
|
|
694
|
-
context, context.ServiceToken, context.ProjectId,
|
|
695
|
-
context.PlayerId!, new List<string> { ProgressKey });
|
|
681
|
+
if (progress.HasPremium)
|
|
682
|
+
return progress; // idempotent -- already owns premium
|
|
696
683
|
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
684
|
+
// Replace this throw with server-side purchase validation, then set HasPremium.
|
|
685
|
+
throw new Exception("PurchasePremium requires server-side purchase validation.");
|
|
686
|
+
}
|
|
700
687
|
|
|
701
|
-
|
|
702
|
-
?? new Dictionary<string, BattlePassProgress>();
|
|
703
|
-
}
|
|
688
|
+
// ── Helpers ──────────────────────────────────────────────────────────────
|
|
704
689
|
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
690
|
+
static void RequireActive(string passId)
|
|
691
|
+
{
|
|
692
|
+
if (!PassWindows.TryGetValue(passId, out var window))
|
|
693
|
+
throw new Exception($"Unknown pass '{passId}'.");
|
|
694
|
+
|
|
695
|
+
var now = DateTime.UtcNow;
|
|
696
|
+
if (now < window.Start || now >= window.End)
|
|
697
|
+
throw new Exception($"Pass '{passId}' is not active.");
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
static int CalculateTier(int currentXp, List<BattlePassTierThreshold> tiers)
|
|
701
|
+
{
|
|
702
|
+
var reached = tiers
|
|
703
|
+
.Where(t => currentXp >= t.XpRequired)
|
|
704
|
+
.OrderByDescending(t => t.TierNumber)
|
|
705
|
+
.FirstOrDefault();
|
|
706
|
+
|
|
707
|
+
return reached?.TierNumber ?? 1;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
async Task<Dictionary<string, BattlePassProgress>> LoadProgressAsync(
|
|
711
|
+
IExecutionContext context, IGameApiClient client)
|
|
712
|
+
{
|
|
713
|
+
var result = await client.CloudSaveData.GetProtectedItemsAsync(
|
|
714
|
+
context, context.ServiceToken, context.ProjectId,
|
|
715
|
+
context.PlayerId!, new List<string> { ProgressKey });
|
|
716
|
+
|
|
717
|
+
var value = result.Data?.Results?.FirstOrDefault()?.Value?.ToString();
|
|
718
|
+
if (string.IsNullOrEmpty(value))
|
|
719
|
+
return new Dictionary<string, BattlePassProgress>();
|
|
720
|
+
|
|
721
|
+
return JsonConvert.DeserializeObject<Dictionary<string, BattlePassProgress>>(value)
|
|
722
|
+
?? new Dictionary<string, BattlePassProgress>();
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
async Task SaveProgressAsync(
|
|
726
|
+
IExecutionContext context, IGameApiClient client,
|
|
727
|
+
Dictionary<string, BattlePassProgress> progress)
|
|
728
|
+
{
|
|
729
|
+
var json = JsonConvert.SerializeObject(progress);
|
|
730
|
+
var body = new SetItemBody(ProgressKey, json);
|
|
731
|
+
await client.CloudSaveData.SetProtectedItemAsync(
|
|
732
|
+
context, context.ServiceToken, context.ProjectId, context.PlayerId!, body);
|
|
733
|
+
}
|
|
713
734
|
}
|
|
714
735
|
}
|
|
715
736
|
```
|
|
716
737
|
|
|
717
738
|
### Server-Side Models (inside BattlePassModule.cs)
|
|
718
739
|
|
|
740
|
+
The single definition of both types, in the module's `Cloud` namespace. Use public members with a public getter and setter, as the auto-properties below: the generator copies only those into the client stub of `BattlePassProgress`, as `{ get; set; }` properties, and `Newtonsoft.Json` serializes them for Cloud Save. Do not declare a second `BattlePassProgress` in client code.
|
|
741
|
+
|
|
719
742
|
```csharp
|
|
720
|
-
|
|
743
|
+
namespace BattlePassModule.Cloud
|
|
721
744
|
{
|
|
722
|
-
public
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
}
|
|
745
|
+
public class BattlePassProgress
|
|
746
|
+
{
|
|
747
|
+
public int CurrentXp { get; set; }
|
|
748
|
+
public int CurrentTier { get; set; }
|
|
749
|
+
public bool HasPremium { get; set; }
|
|
750
|
+
public List<string> ClaimedRewards { get; set; } = new();
|
|
751
|
+
}
|
|
727
752
|
|
|
728
|
-
public class BattlePassTierThreshold
|
|
729
|
-
{
|
|
730
|
-
|
|
731
|
-
|
|
753
|
+
public class BattlePassTierThreshold
|
|
754
|
+
{
|
|
755
|
+
public int TierNumber { get; set; }
|
|
756
|
+
public int XpRequired { get; set; }
|
|
757
|
+
}
|
|
732
758
|
}
|
|
733
759
|
```
|
|
734
760
|
|
|
@@ -751,7 +777,7 @@ Place at `Assets/BattlePasses.rc`. Contains pass definitions as a JSON array und
|
|
|
751
777
|
"StartDate": "2024-01-01T00:00:00Z",
|
|
752
778
|
"EndDate": "2026-06-30T23:59:59Z",
|
|
753
779
|
"Tiers": [
|
|
754
|
-
{ "TierNumber": 1, "XpRequired": 0, "FreeRewardId": "item_bronze_badge", "PremiumRewardId": "
|
|
780
|
+
{ "TierNumber": 1, "XpRequired": 0, "FreeRewardId": "item_bronze_badge", "PremiumRewardId": "item_gold_frame" },
|
|
755
781
|
{ "TierNumber": 2, "XpRequired": 500, "FreeRewardId": "item_xp_boost", "PremiumRewardId": "item_rare_skin_fragment" },
|
|
756
782
|
{ "TierNumber": 3, "XpRequired": 1200, "FreeRewardId": "item_silver_badge", "PremiumRewardId": "item_legendary_skin" }
|
|
757
783
|
]
|
|
@@ -781,18 +807,30 @@ Place at `Assets/BattlePasses.rc`. Contains pass definitions as a JSON array und
|
|
|
781
807
|
- `XpRequired` is **cumulative** XP to reach the tier, not a delta from the previous tier.
|
|
782
808
|
Tier 1 must always have `XpRequired: 0` so it is immediately reachable.
|
|
783
809
|
- `FreeRewardId` / `PremiumRewardId` are arbitrary strings. The client reads these IDs and maps
|
|
784
|
-
them to display names/icons locally.
|
|
810
|
+
them to display names/icons locally. `ClaimReward` records the claim in `ClaimedRewards`; the game grants what
|
|
811
|
+
the ID stands for — unlock it client-side from the claimed set, or have the module grant it through
|
|
812
|
+
Cloud Save Protected or another Cloud Code call alongside the claim.
|
|
813
|
+
- Treat a claim as an entitlement only if the XP behind it is trustworthy. The sample `AwardXp`
|
|
814
|
+
accepts any `amount` up to the `MaxXpPerSource` cap from a signed-in client, so before
|
|
815
|
+
granting anything valuable, derive XP from server-verified events (or make `AwardXp`
|
|
816
|
+
non-client-callable and drive it from server-validated events).
|
|
817
|
+
- Make the grant idempotent and retryable from the saved claim: if the grant fails after the claim
|
|
818
|
+
is saved, a retry of `ClaimReward` fails its duplicate-claim check, so grant from the stored claim
|
|
819
|
+
(or persist claim and grant in one recoverable operation) rather than only on the first call.
|
|
820
|
+
- `ClaimedRewards` stores keys such as `tier_1_free`, not reward IDs. Keep reward IDs immutable
|
|
821
|
+
for the life of a pass, or store the granted reward ID with the claim, so a changed ID cannot
|
|
822
|
+
unlock a different reward for an old claim.
|
|
785
823
|
- Date filtering happens **client-side** after fetch. Add passes to the file before their
|
|
786
824
|
`StartDate` — they will be ignored by the client until the start time is reached.
|
|
787
825
|
|
|
788
826
|
### Cloud Code Module
|
|
789
827
|
|
|
790
|
-
> Create the
|
|
791
|
-
>
|
|
792
|
-
>
|
|
793
|
-
>
|
|
794
|
-
>
|
|
795
|
-
>
|
|
828
|
+
> Create the module files listed in [Cloud Code Module Implementation](#cloud-code-module-implementation) above.
|
|
829
|
+
> See the Creating a Cloud Code Module section of `references/cloud-code-modules.md`
|
|
830
|
+
> for the generic templates; replace `MyModule` with `BattlePassModule`.
|
|
831
|
+
>
|
|
832
|
+
> The `.ccmu` is deployed by the Deployment Window like any other cloud asset, but its code is compiled by
|
|
833
|
+
> Unity — a project that does not compile has nothing to deploy.
|
|
796
834
|
|
|
797
835
|
### Access Control
|
|
798
836
|
|
|
@@ -810,7 +848,7 @@ Ensure these packages are listed in `Packages/manifest.json`:
|
|
|
810
848
|
{
|
|
811
849
|
"dependencies": {
|
|
812
850
|
"com.unity.services.authentication": "3.6.1",
|
|
813
|
-
"com.unity.services.cloudcode": "
|
|
851
|
+
"com.unity.services.cloudcode": "3.0.0",
|
|
814
852
|
"com.unity.services.cloudsave": "3.4.0",
|
|
815
853
|
"com.unity.services.core": "1.16.0",
|
|
816
854
|
"com.unity.services.deployment": "1.7.2",
|
|
@@ -821,6 +859,11 @@ Ensure these packages are listed in `Packages/manifest.json`:
|
|
|
821
859
|
}
|
|
822
860
|
```
|
|
823
861
|
|
|
862
|
+
> `com.unity.services.cloudcode` **`3.0.0`** is the native-authoring line, which the `.ccmu` module
|
|
863
|
+
> below requires — see the Requirements section of `references/cloud-code-modules.md`. The `2.10.x` line
|
|
864
|
+
> deploys legacy `.ccmr` modules only; use it when maintaining one, not for new work.
|
|
865
|
+
|
|
866
|
+
|
|
824
867
|
`com.unity.nuget.newtonsoft-json` is required for `JsonConvert` used in serialization of tier data and progress.
|
|
825
868
|
|
|
826
869
|
---
|
|
@@ -829,10 +872,10 @@ Ensure these packages are listed in `Packages/manifest.json`:
|
|
|
829
872
|
|
|
830
873
|
- [ ] All packages added to `Packages/manifest.json`
|
|
831
874
|
- [ ] Remote Config `.rc` file created with `"battle_passes"` entry and at least one active pass
|
|
832
|
-
- [ ] Cloud Code module
|
|
875
|
+
- [ ] Cloud Code module authored as a `.ccmu`: module asset, `Cloud/` + `Client/` asmdefs, endpoint class, `CloudSetup.cs` (see file list in [Cloud Code Module Implementation](#cloud-code-module-implementation))
|
|
833
876
|
- [ ] `BattlePassModule.cs` added to the module project with `AwardXp`, `ClaimReward`, `PurchasePremium` functions
|
|
834
877
|
- [ ] Environment selected in **Services > Deployment** settings
|
|
835
|
-
- [ ] Deploy all via the Deployment Window: select `BattlePasses.rc` and `BattlePassModule.
|
|
878
|
+
- [ ] Deploy all via the Deployment Window: select `BattlePasses.rc` and `BattlePassModule.ccmu`, click **Deploy**
|
|
836
879
|
- [ ] Project linked in **Edit > Project Settings > Services**
|
|
837
880
|
|
|
838
881
|
---
|
|
@@ -841,20 +884,21 @@ Ensure these packages are listed in `Packages/manifest.json`:
|
|
|
841
884
|
|
|
842
885
|
After implementing the battle pass feature, verify:
|
|
843
886
|
|
|
844
|
-
1. **Project compiles** without errors
|
|
887
|
+
1. **Project compiles** without errors — the module's Editor-only cloud assembly is compiled with the rest of the Unity project.
|
|
845
888
|
2. **Initialization order** is correct: `UnityServices.InitializeAsync()` then `AuthenticationService.Instance.SignInAnonymouslyAsync()` then service calls.
|
|
846
889
|
3. **Protected bucket reads** use `ProtectedReadAccessClassOptions` -- using the wrong access class returns no data.
|
|
847
|
-
4. **
|
|
848
|
-
5. **
|
|
849
|
-
6. **
|
|
850
|
-
7. **
|
|
851
|
-
8. **
|
|
852
|
-
9. **
|
|
853
|
-
10. **
|
|
890
|
+
4. **Client bindings resolve**: the game assembly references the module's client assembly and calls `BattlePassModuleClient`. The deployed module name is the **cloud asmdef name**, `BattlePassModule` (the `name` field of `Cloud/BattlePassModule.asmdef`), not the `.ccmu` filename.
|
|
891
|
+
5. **One progress definition**: `BattlePassProgress` is declared only in the Cloud Code module, as `{ get; set; }` properties, and the client uses its generated stub.
|
|
892
|
+
6. **No direct client writes** to `"battle_pass_progress"` -- all mutations go through Cloud Code.
|
|
893
|
+
7. **No client-supplied tier data**: `AwardXp` and `ClaimReward` use the module's server-side `PassTiers`, which matches the `XpRequired` values in `BattlePasses.rc`, and reject passes outside the server-side `PassWindows` (matching `StartDate`/`EndDate`).
|
|
894
|
+
8. **Date filtering** uses `DateTime.UtcNow` with `DateTimeStyles.RoundtripKind` for consistent UTC parsing.
|
|
895
|
+
9. **Cloud resources** are present and deployable: `BattlePasses.rc` and `BattlePassModule.ccmu` appear in the Deployment Window.
|
|
896
|
+
10. **PurchasePremium is an integration stub** -- it returns existing progress when `HasPremium` is already true and otherwise throws until you add purchase validation.
|
|
897
|
+
11. **ClaimReward validates** the pass window (`PassWindows`), tier reach (against `PassTiers`) and premium ownership before recording the claim.
|
|
898
|
+
12. **Premium purchasing is not deployable until a validated purchase flow sets `HasPremium`** -- keep the fail-closed throw until then.
|
|
854
899
|
|
|
855
900
|
---
|
|
856
901
|
|
|
857
902
|
## Asset Store & Sample Projects
|
|
858
903
|
|
|
859
904
|
- **Use Case Samples — Battle Pass:** The official [Use Case Samples](https://github.com/Unity-Technologies/com.unity.services.samples.use-cases) repository includes a complete Battle Pass sample with seasonal reward tiers, free/premium tracks, time-limited rewards, and server-authoritative progression via Cloud Code. Clone the repo and open the "Battle Pass" scene for a working reference.
|
|
860
|
-
- **Use Case Samples — Virtual Shop:** The same repository includes a Virtual Shop sample demonstrating Economy-based in-game stores, currency management, and inventory — patterns commonly paired with a Battle Pass.
|