@aqian0/dsh-unity 0.0.0-stage → 0.1.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 (360) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/LICENSE-UNITY-COMPANION.md +122 -0
  3. package/LICENSE.md +31 -0
  4. package/NOTICE.md +90 -0
  5. package/README.md +273 -2
  6. package/cordis.patch.yml +22 -0
  7. package/docs/design.md +297 -0
  8. package/icon.svg +16 -0
  9. package/lib/frontmatter.js +392 -0
  10. package/lib/gating.js +105 -0
  11. package/lib/harness.js +16 -0
  12. package/lib/index.js +171 -0
  13. package/lib/project.js +210 -0
  14. package/lib/registry.js +268 -0
  15. package/lib/requirements.js +214 -0
  16. package/lib/skills.js +191 -0
  17. package/lib/types/frontmatter.d.ts +84 -0
  18. package/lib/types/gating.d.ts +80 -0
  19. package/lib/types/harness.d.ts +152 -0
  20. package/lib/types/index.d.ts +75 -0
  21. package/lib/types/project.d.ts +93 -0
  22. package/lib/types/registry.d.ts +96 -0
  23. package/lib/types/requirements.d.ts +67 -0
  24. package/lib/types/skills.d.ts +54 -0
  25. package/lib/types/watch.d.ts +34 -0
  26. package/lib/watch.js +84 -0
  27. package/locale/en.json +6 -0
  28. package/locale/zh.json +6 -0
  29. package/package.json +70 -4
  30. package/skills/2d-pixel-perfect/SKILL.md +208 -0
  31. package/skills/2d-pixel-perfect/references/api-reference.md +81 -0
  32. package/skills/2d-pixel-perfect/references/camera-setup-builtin.cs +40 -0
  33. package/skills/2d-pixel-perfect/references/camera-setup-urp.cs +49 -0
  34. package/skills/2d-pixel-perfect/references/pipeline-detection.cs +50 -0
  35. package/skills/2d-pixel-perfect/references/sprite-settings.cs +37 -0
  36. package/skills/asset-transformer-toolkit/SECURITY.md +15 -0
  37. package/skills/asset-transformer-toolkit/SKILL.md +39 -0
  38. package/skills/asset-transformer-toolkit/references/create-importer.md +121 -0
  39. package/skills/asset-transformer-toolkit/references/lods.md +61 -0
  40. package/skills/asset-transformer-toolkit/references/rule-api.md +154 -0
  41. package/skills/asset-transformer-toolkit/references/ruleblock-api.md +37 -0
  42. package/skills/asset-transformer-toolkit/references/ruleset-api.md +138 -0
  43. package/skills/asset-transformer-toolkit/references/rulesets-and-actions.md +227 -0
  44. package/skills/audio-setup-mixers/SECURITY.md +16 -0
  45. package/skills/audio-setup-mixers/SKILL.md +127 -0
  46. package/skills/audio-setup-mixers/references/api.md +162 -0
  47. package/skills/build-gtk/SECURITY.md +16 -0
  48. package/skills/build-gtk/SKILL.md +200 -0
  49. package/skills/build-gtk/references/api-reference.md +33 -0
  50. package/skills/build-gtk/references/graph-api-gaps.md +96 -0
  51. package/skills/build-gtk/references/runtime-and-visualization.md +191 -0
  52. package/skills/build-gtk/references/state-machine-api.md +270 -0
  53. package/skills/build-gtk/references/where-the-docs-stop.md +49 -0
  54. package/skills/build-live-game/SKILL.md +159 -0
  55. package/skills/build-live-game/references/achievements.md +757 -0
  56. package/skills/build-live-game/references/apis.md +271 -0
  57. package/skills/build-live-game/references/authentication.md +431 -0
  58. package/skills/build-live-game/references/battlepass.md +904 -0
  59. package/skills/build-live-game/references/blueprints-and-samples.md +75 -0
  60. package/skills/build-live-game/references/cloud-code-cloudbehaviours.md +1111 -0
  61. package/skills/build-live-game/references/cloud-code-modules.md +1276 -0
  62. package/skills/build-live-game/references/cloud-code.md +58 -0
  63. package/skills/build-live-game/references/cloud-save.md +464 -0
  64. package/skills/build-live-game/references/deployment.md +231 -0
  65. package/skills/build-live-game/references/orientation.md +30 -0
  66. package/skills/build-live-game/references/player-account.md +821 -0
  67. package/skills/build-live-game/references/remote-config.md +96 -0
  68. package/skills/build-live-game/references/services-overview.md +76 -0
  69. package/skills/build-live-game/references/tooling.md +375 -0
  70. package/skills/build-live-game/references/ugs-cli.md +86 -0
  71. package/skills/craft-game-floors/SECURITY.md +23 -0
  72. package/skills/craft-game-floors/SKILL.md +134 -0
  73. package/skills/craft-game-floors/references/art-direction.md +85 -0
  74. package/skills/craft-game-floors/references/camera-rigs.md +51 -0
  75. package/skills/craft-game-floors/references/character-motion.md +35 -0
  76. package/skills/craft-game-floors/references/game-audio.md +47 -0
  77. package/skills/craft-game-floors/references/game-feel.md +68 -0
  78. package/skills/craft-game-floors/references/game-shell.md +45 -0
  79. package/skills/craft-game-floors/references/live-floor.md +35 -0
  80. package/skills/craft-game-floors/references/placeholder-assets.md +35 -0
  81. package/skills/craft-game-floors/references/scene-lighting.md +52 -0
  82. package/skills/craft-game-floors/references/toon-shading.md +34 -0
  83. package/skills/craft-game-floors/references/vfx.md +40 -0
  84. package/skills/craft-game-floors/references/visual-scorecard.md +43 -0
  85. package/skills/create-2d-physics/SECURITY.md +16 -0
  86. package/skills/create-2d-physics/SKILL.md +128 -0
  87. package/skills/create-2d-physics/references/2d-physics-core.md +155 -0
  88. package/skills/create-2d-physics/references/legacy-2d-physics.md +45 -0
  89. package/skills/create-tile-palette-or-rule-tiles/SKILL.md +95 -0
  90. package/skills/create-tile-palette-or-rule-tiles/references/hexagonalruletile.md +71 -0
  91. package/skills/create-tile-palette-or-rule-tiles/references/palette-create.md +38 -0
  92. package/skills/create-tile-palette-or-rule-tiles/references/ruletile-createempty.md +37 -0
  93. package/skills/create-tile-palette-or-rule-tiles/references/ruletile-createfromsegment.md +219 -0
  94. package/skills/create-tile-palette-or-rule-tiles/references/ruletile.md +95 -0
  95. package/skills/create-tile-palette-or-rule-tiles/scripts/CreatePaletteTemplate.cs +148 -0
  96. package/skills/create-tile-palette-or-rule-tiles/scripts/ManualWorkflowExample.cs +63 -0
  97. package/skills/create-tile-palette-or-rule-tiles/scripts/RuleTileGenerator.cs +61 -0
  98. package/skills/create-tile-palette-or-rule-tiles/scripts/TilemapRuleTileCreateFromSegment.cs +225 -0
  99. package/skills/fix-3d-physics-collisions/SECURITY.md +17 -0
  100. package/skills/fix-3d-physics-collisions/SKILL.md +139 -0
  101. package/skills/fix-3d-physics-collisions/references/collision-checklist.md +80 -0
  102. package/skills/fix-3d-physics-collisions/references/collision-debugger.md +18 -0
  103. package/skills/fix-3d-physics-collisions/references/console-errors-table.md +9 -0
  104. package/skills/fix-3d-physics-collisions/references/kinematic-trigger-facts.md +18 -0
  105. package/skills/fix-3d-physics-collisions/references/other-symptoms.md +29 -0
  106. package/skills/fix-3d-physics-collisions/references/raycast-checklist.md +8 -0
  107. package/skills/fix-3d-physics-collisions/references/topic-map.md +42 -0
  108. package/skills/fix-3d-physics-collisions/references/trigger-checklist.md +9 -0
  109. package/skills/fix-3d-physics-collisions/scripts/CollisionDebugger.cs +561 -0
  110. package/skills/generate-editor-search-query/SECURITY.md +17 -0
  111. package/skills/generate-editor-search-query/SKILL.md +117 -0
  112. package/skills/generate-editor-search-query/references/open-search-window.md +70 -0
  113. package/skills/generate-editor-search-query/references/query-patterns.md +124 -0
  114. package/skills/implement-in-app-purchases/SKILL.md +82 -0
  115. package/skills/implement-in-app-purchases/references/api-details.md +41 -0
  116. package/skills/implement-in-app-purchases/references/api-notes.md +105 -0
  117. package/skills/implement-in-app-purchases/references/codeless-catalog.md +197 -0
  118. package/skills/implement-in-app-purchases/references/convert-adapty.md +270 -0
  119. package/skills/implement-in-app-purchases/references/convert-essentialkit.md +239 -0
  120. package/skills/implement-in-app-purchases/references/convert-revenuecat.md +277 -0
  121. package/skills/implement-in-app-purchases/references/convert-unipay.md +145 -0
  122. package/skills/implement-in-app-purchases/references/migration-v4-to-v5.md +46 -0
  123. package/skills/implement-in-app-purchases/references/path-add-iap-to-new-project.md +197 -0
  124. package/skills/implement-in-app-purchases/references/path-convert-native-google-billing.md +302 -0
  125. package/skills/implement-in-app-purchases/references/path-convert-native-storekit.md +357 -0
  126. package/skills/implement-in-app-purchases/references/path-implement-iap-d2c.md +253 -0
  127. package/skills/implement-in-app-purchases/references/platform-notes.md +55 -0
  128. package/skills/implement-in-app-purchases/references/pre-check.md +207 -0
  129. package/skills/implement-in-app-purchases/references/topic-map.md +46 -0
  130. package/skills/initialize-ai-navigation/SKILL.md +109 -0
  131. package/skills/initialize-ai-navigation/references/navigation-system.md +793 -0
  132. package/skills/initialize-ai-navigation/references/topic-map.md +66 -0
  133. package/skills/levelplay-unity-integration/SKILL.md +122 -0
  134. package/skills/levelplay-unity-integration/references/adding-more-ad-formats.md +15 -0
  135. package/skills/levelplay-unity-integration/references/banner-api.md +927 -0
  136. package/skills/levelplay-unity-integration/references/best-practices.md +604 -0
  137. package/skills/levelplay-unity-integration/references/dependency-resolution.md +94 -0
  138. package/skills/levelplay-unity-integration/references/examples.md +10 -0
  139. package/skills/levelplay-unity-integration/references/ilrd-api.md +337 -0
  140. package/skills/levelplay-unity-integration/references/initialization-api.md +851 -0
  141. package/skills/levelplay-unity-integration/references/interstitial-api.md +907 -0
  142. package/skills/levelplay-unity-integration/references/ios-setup.md +463 -0
  143. package/skills/levelplay-unity-integration/references/migration-sdk-9.md +666 -0
  144. package/skills/levelplay-unity-integration/references/privacy-settings.md +593 -0
  145. package/skills/levelplay-unity-integration/references/production-release-checklist.md +22 -0
  146. package/skills/levelplay-unity-integration/references/rewarded-api.md +918 -0
  147. package/skills/levelplay-unity-integration/references/step-0-new-or-migration.md +8 -0
  148. package/skills/levelplay-unity-integration/references/step-1-verify-environment.md +4 -0
  149. package/skills/levelplay-unity-integration/references/step-10-testing.md +15 -0
  150. package/skills/levelplay-unity-integration/references/step-2-business-goals.md +12 -0
  151. package/skills/levelplay-unity-integration/references/step-3-install-sdk.md +55 -0
  152. package/skills/levelplay-unity-integration/references/step-4-native-dependencies.md +22 -0
  153. package/skills/levelplay-unity-integration/references/step-5-app-key-and-ad-units.md +18 -0
  154. package/skills/levelplay-unity-integration/references/step-6-5-privacy-and-regulation.md +51 -0
  155. package/skills/levelplay-unity-integration/references/step-6-admob-keys.md +16 -0
  156. package/skills/levelplay-unity-integration/references/step-7-initialize.md +50 -0
  157. package/skills/levelplay-unity-integration/references/step-8-ad-unit-strategy.md +16 -0
  158. package/skills/levelplay-unity-integration/references/step-9-implement-ad-units.md +66 -0
  159. package/skills/levelplay-unity-integration/references/testing-and-validation.md +222 -0
  160. package/skills/levelplay-unity-integration/references/troubleshooting.md +99 -0
  161. package/skills/localize-unity-project/SKILL.md +159 -0
  162. package/skills/localize-unity-project/references/api-notes.md +15 -0
  163. package/skills/localize-unity-project/references/cjk-fonts.md +83 -0
  164. package/skills/localize-unity-project/references/docs-map.md +42 -0
  165. package/skills/localize-unity-project/references/documentation-lookup.md +33 -0
  166. package/skills/localize-unity-project/references/locale-switching.md +17 -0
  167. package/skills/localize-unity-project/references/table-completeness-check.md +47 -0
  168. package/skills/localize-unity-project/references/translating-existing-project.md +47 -0
  169. package/skills/localize-unity-project/references/translation-strategy.md +41 -0
  170. package/skills/localize-unity-project/references/troubleshooting.md +12 -0
  171. package/skills/localize-unity-project/scripts/L10nBatchProcessor.cs +191 -0
  172. package/skills/localize-unity-project/scripts/LocalizedFontAsset.cs +18 -0
  173. package/skills/manage-sprite-atlas/SKILL.md +202 -0
  174. package/skills/manage-sprite-atlas/references/addressables-delivery.md +58 -0
  175. package/skills/manage-sprite-atlas/references/advanced-manual-authoring.md +19 -0
  176. package/skills/manage-sprite-atlas/references/api.md +382 -0
  177. package/skills/manage-sprite-atlas/references/best-practices.md +183 -0
  178. package/skills/manage-sprite-atlas/references/common-errors.md +123 -0
  179. package/skills/manage-sprite-atlas/references/complete-workflow.md +61 -0
  180. package/skills/manage-sprite-atlas/references/custom-packing.md +147 -0
  181. package/skills/manage-sprite-atlas/references/delivery-mechanism.md +30 -0
  182. package/skills/manage-sprite-atlas/references/key-requirements.md +21 -0
  183. package/skills/manage-sprite-atlas/references/manual-authoring.md +39 -0
  184. package/skills/manage-sprite-atlas/references/namespaces.md +15 -0
  185. package/skills/manage-sprite-atlas/references/v2-architecture.md +21 -0
  186. package/skills/manage-sprite-atlas/resources/authoringvsruntime.cs +176 -0
  187. package/skills/manage-sprite-atlas/resources/buildaddressablespostprocess.cs +59 -0
  188. package/skills/manage-sprite-atlas/resources/cacheloadedatlases.cs +145 -0
  189. package/skills/manage-sprite-atlas/resources/cleanupbatchoperations.cs +119 -0
  190. package/skills/manage-sprite-atlas/resources/createandconfiguremasteratlas.cs +57 -0
  191. package/skills/manage-sprite-atlas/resources/custompackersetup.cs +88 -0
  192. package/skills/manage-sprite-atlas/resources/deprecatedmethods.cs +142 -0
  193. package/skills/manage-sprite-atlas/resources/dontmodifywithoutsaving.cs +120 -0
  194. package/skills/manage-sprite-atlas/resources/dontpackinruntimebuilds.cs +190 -0
  195. package/skills/manage-sprite-atlas/resources/dontscriptspriteatlasineditor.cs +114 -0
  196. package/skills/manage-sprite-atlas/resources/editorconfiguration.cs +95 -0
  197. package/skills/manage-sprite-atlas/resources/enablespritepacking.cs +172 -0
  198. package/skills/manage-sprite-atlas/resources/gridspritepacker.cs +50 -0
  199. package/skills/manage-sprite-atlas/resources/handlelatebinding.cs +147 -0
  200. package/skills/manage-sprite-atlas/resources/handlenullcases.cs +141 -0
  201. package/skills/manage-sprite-atlas/resources/migratev1tov2.cs +335 -0
  202. package/skills/manage-sprite-atlas/resources/multipagepacker.cs +80 -0
  203. package/skills/manage-sprite-atlas/resources/optimizetexturesettings.cs +191 -0
  204. package/skills/manage-sprite-atlas/resources/packerdebugging.cs +158 -0
  205. package/skills/manage-sprite-atlas/resources/packtransform.cs +51 -0
  206. package/skills/manage-sprite-atlas/resources/platformnames.cs +127 -0
  207. package/skills/manage-sprite-atlas/resources/queryspritesefficiently.cs +222 -0
  208. package/skills/manage-sprite-atlas/resources/registercallbacks.cs +152 -0
  209. package/skills/manage-sprite-atlas/resources/runtimeatlasloader.cs +15 -0
  210. package/skills/manage-sprite-atlas/resources/runtimespriteaccess.cs +19 -0
  211. package/skills/manage-sprite-atlas/resources/savespriteatlasasset.cs +107 -0
  212. package/skills/manage-sprite-atlas/resources/scriptablepacker.cs +81 -0
  213. package/skills/manage-sprite-atlas/resources/setincludeinbuild.cs +164 -0
  214. package/skills/manage-sprite-atlas/resources/sizeoptimizedpacker.cs +88 -0
  215. package/skills/manage-sprite-atlas/resources/spriteatlaslatebinding.cs +123 -0
  216. package/skills/manage-sprite-atlas/resources/spriteatlasprebuildgenerator.cs +219 -0
  217. package/skills/manage-sprite-atlas/resources/spritedata.cs +35 -0
  218. package/skills/manage-sprite-atlas/resources/spritepack.cs +39 -0
  219. package/skills/manage-sprite-atlas/resources/texturedata.cs +15 -0
  220. package/skills/manage-sprite-atlas/resources/updatebuildscripts.cs +357 -0
  221. package/skills/manage-sprite-atlas/resources/updatesettingsconfiguration.cs +135 -0
  222. package/skills/manage-sprite-atlas/resources/usevariantswisely.cs +179 -0
  223. package/skills/manage-sprite-atlas/resources/variantatlas.cs +39 -0
  224. package/skills/migrate-birp-to-urp/SECURITY.md +16 -0
  225. package/skills/migrate-birp-to-urp/SKILL.md +167 -0
  226. package/skills/migrate-birp-to-urp/references/capturing-the-editor.md +66 -0
  227. package/skills/migrate-birp-to-urp/references/complex-shader-situations.md +272 -0
  228. package/skills/migrate-birp-to-urp/references/conversion-and-rendering-triage.md +113 -0
  229. package/skills/migrate-birp-to-urp/references/custom-shader-triage.md +123 -0
  230. package/skills/migrate-birp-to-urp/references/implementation-patterns.md +529 -0
  231. package/skills/migrate-birp-to-urp/references/migration-workflow.md +265 -0
  232. package/skills/migrate-birp-to-urp/references/parity-validation-and-troubleshooting.md +114 -0
  233. package/skills/migrate-birp-to-urp/references/preflight-and-urp-setup.md +195 -0
  234. package/skills/migrate-birp-to-urp/references/quality-settings-map.md +69 -0
  235. package/skills/new-unity-project/SECURITY.md +26 -0
  236. package/skills/new-unity-project/SKILL.md +171 -0
  237. package/skills/new-unity-project/references/checklist.md +18 -0
  238. package/skills/new-unity-project/references/common-mistakes.md +15 -0
  239. package/skills/new-unity-project/references/skill-setup.md +66 -0
  240. package/skills/new-unity-project/references/step-1-concept.md +13 -0
  241. package/skills/new-unity-project/references/step-2-platforms-and-create.md +31 -0
  242. package/skills/new-unity-project/references/step-3-join-and-reconcile.md +16 -0
  243. package/skills/new-unity-project/references/step-4-source-control.md +9 -0
  244. package/skills/new-unity-project/references/step-5-packages.md +18 -0
  245. package/skills/new-unity-project/references/step-6-identity-and-floors.md +20 -0
  246. package/skills/new-unity-project/references/step-7-visual-baseline.md +75 -0
  247. package/skills/new-unity-project/references/step-8-first-commit.md +21 -0
  248. package/skills/new-unity-project/references/step-9-handoff.md +23 -0
  249. package/skills/optimize-audio/SECURITY.md +16 -0
  250. package/skills/optimize-audio/SKILL.md +120 -0
  251. package/skills/optimize-audio/references/diagnostics.md +42 -0
  252. package/skills/optimize-audio/references/troubleshooting.md +41 -0
  253. package/skills/optimize-audio/resources/audio-import-api.md +149 -0
  254. package/skills/optimize-audio/resources/platform-settings.md +48 -0
  255. package/skills/optimize-text-mesh-pro/SKILL.md +181 -0
  256. package/skills/optimize-text-mesh-pro/references/dynamic-atlas-and-profiling.md +28 -0
  257. package/skills/optimize-text-mesh-pro/references/topic-map.md +36 -0
  258. package/skills/optimize-web/SECURITY.md +16 -0
  259. package/skills/optimize-web/SKILL.md +157 -0
  260. package/skills/optimize-web/references/editor-csharp.md +120 -0
  261. package/skills/optimize-web/references/topic-map.md +49 -0
  262. package/skills/optimize-web/references/troubleshooting.md +45 -0
  263. package/skills/optimize-web/references/understand-request.md +19 -0
  264. package/skills/optimize-web/references/web-assets-quality.md +59 -0
  265. package/skills/optimize-web/references/web-player-settings.md +39 -0
  266. package/skills/optimize-web/references/web-profiling-memory.md +71 -0
  267. package/skills/optimize-web/scripts/WebOptimizer.cs +46 -0
  268. package/skills/optimize-web/scripts/toktx-examples.sh +11 -0
  269. package/skills/setup-multiplayer-services/SKILL.md +36 -0
  270. package/skills/setup-multiplayer-services/references/dgs-entrypoint.md +79 -0
  271. package/skills/setup-multiplayer-services/references/entrypoints.md +213 -0
  272. package/skills/setup-multiplayer-services/references/examples.md +33 -0
  273. package/skills/setup-multiplayer-services/references/implementation-fit.md +30 -0
  274. package/skills/setup-multiplayer-services/references/underlying-services.md +11 -0
  275. package/skills/setup-multiplayer-services/references/workflows-prerequisites.md +17 -0
  276. package/skills/setup-vivox-voice-chat/SECURITY.md +16 -0
  277. package/skills/setup-vivox-voice-chat/SKILL.md +166 -0
  278. package/skills/setup-vivox-voice-chat/references/api-reference-lookup.md +28 -0
  279. package/skills/setup-vivox-voice-chat/references/docs-topic-map.md +13 -0
  280. package/skills/setup-vivox-voice-chat/references/events-and-participants.md +79 -0
  281. package/skills/setup-vivox-voice-chat/references/init-and-login.md +92 -0
  282. package/skills/setup-vivox-voice-chat/references/text-chat.md +93 -0
  283. package/skills/setup-vivox-voice-chat/references/troubleshooting.md +47 -0
  284. package/skills/setup-vivox-voice-chat/references/voice-channels.md +92 -0
  285. package/skills/shader-graph-create-custom-node/SKILL.md +25 -0
  286. package/skills/shader-graph-create-custom-node/resources/all_hints.hlsl +182 -0
  287. package/skills/sprite-editor/SECURITY.md +16 -0
  288. package/skills/sprite-editor/SKILL.md +66 -0
  289. package/skills/sprite-editor/references/api_reference.md +151 -0
  290. package/skills/sprite-editor/references/background.md +112 -0
  291. package/skills/sprite-editor/references/templates.md +72 -0
  292. package/skills/sprite-editor/scripts/AutomaticSliceTexture.cs +40 -0
  293. package/skills/sprite-editor/scripts/GenerateNewSpriteRects.cs +200 -0
  294. package/skills/sprite-editor/scripts/GetTextureSourceImageSize.cs +32 -0
  295. package/skills/sprite-editor/scripts/GetTextureToSlice.cs +55 -0
  296. package/skills/sprite-editor/scripts/GridSliceTexture.cs +40 -0
  297. package/skills/sprite-editor/scripts/IsometricSliceTexture.cs +141 -0
  298. package/skills/sprite-editor/scripts/README.md +134 -0
  299. package/skills/sprite-editor/scripts/SetPivotExample.cs +58 -0
  300. package/skills/sprite-editor/scripts/SpriteToPng.cs +88 -0
  301. package/skills/sprite-segment-3x3grid/SKILL.md +177 -0
  302. package/skills/sprite-segment-3x3grid/references/topic-map.md +37 -0
  303. package/skills/sprite-segment-3x3grid/scripts/SpriteGridAnalysis.cs +119 -0
  304. package/skills/ui/SKILL.md +142 -0
  305. package/skills/ui-imgui/SKILL.md +180 -0
  306. package/skills/ui-imgui/references/gui-elements.md +156 -0
  307. package/skills/ui-imgui/references/templates.md +141 -0
  308. package/skills/ui-ugui/SKILL.md +217 -0
  309. package/skills/ui-ugui/references/layout-and-anchors.md +61 -0
  310. package/skills/ui-ugui/references/scrollview-setup.md +29 -0
  311. package/skills/ui-uitk/SKILL.md +229 -0
  312. package/skills/ui-uitk/references/common-issues.md +74 -0
  313. package/skills/ui-uitk/references/custom-elements.md +241 -0
  314. package/skills/ui-uitk/references/painter2d.md +282 -0
  315. package/skills/ui-uitk/references/pointermanipulator-guide.md +94 -0
  316. package/skills/ui-uitk/references/svg-icons.md +136 -0
  317. package/skills/ui-uitk/references/ui-runtime-binding.md +234 -0
  318. package/skills/ui-uitk/references/uss-guide.md +138 -0
  319. package/skills/unity-cli/CHANGELOG.md +524 -0
  320. package/skills/unity-cli/SECURITY.md +68 -0
  321. package/skills/unity-cli/SKILL.md +160 -0
  322. package/skills/unity-cli/references/auth-license-cloud.md +318 -0
  323. package/skills/unity-cli/references/bootstrap-project.md +177 -0
  324. package/skills/unity-cli/references/build-run-test.md +555 -0
  325. package/skills/unity-cli/references/catalog-plugins.md +86 -0
  326. package/skills/unity-cli/references/ci-recipes.md +76 -0
  327. package/skills/unity-cli/references/cloud-automation.md +819 -0
  328. package/skills/unity-cli/references/cloud-workflows.md +19 -0
  329. package/skills/unity-cli/references/collaboration.md +533 -0
  330. package/skills/unity-cli/references/config-hub.md +239 -0
  331. package/skills/unity-cli/references/diagnostics-maintenance.md +718 -0
  332. package/skills/unity-cli/references/docs-workflow.md +179 -0
  333. package/skills/unity-cli/references/editor-targeting.md +29 -0
  334. package/skills/unity-cli/references/editors-install.md +490 -0
  335. package/skills/unity-cli/references/environment-variables.md +42 -0
  336. package/skills/unity-cli/references/exit-codes.md +47 -0
  337. package/skills/unity-cli/references/global-flags.md +32 -0
  338. package/skills/unity-cli/references/integration-advanced.md +1130 -0
  339. package/skills/unity-cli/references/notes.md +20 -0
  340. package/skills/unity-cli/references/notifications.md +39 -0
  341. package/skills/unity-cli/references/playmode-verification-loop.md +279 -0
  342. package/skills/unity-cli/references/projects-templates.md +997 -0
  343. package/skills/unity-cli/references/scene-editing-preflight.md +25 -0
  344. package/skills/unity-cli/references/setup-and-help.md +54 -0
  345. package/skills/unity-cli/references/version-control.md +612 -0
  346. package/skills/unity-package-management/SKILL.md +169 -0
  347. package/skills/unity-package-management/references/discovering-packages.md +66 -0
  348. package/skills/unity-package-management/references/headless-run.md +31 -0
  349. package/skills/unity-package-management/references/installer-script.md +92 -0
  350. package/skills/unity-package-management/references/select-packages.md +126 -0
  351. package/skills/unity-pipeline/SECURITY.md +17 -0
  352. package/skills/unity-pipeline/SKILL.md +205 -0
  353. package/skills/unity-pipeline/references/csharp-eval.md +23 -0
  354. package/skills/unity-pipeline/references/multiplayer-play-mode.md +103 -0
  355. package/skills/urp-postprocessing/SECURITY.md +16 -0
  356. package/skills/urp-postprocessing/SKILL.md +188 -0
  357. package/skills/urp-postprocessing/references/code-templates.md +150 -0
  358. package/skills/urp-postprocessing/references/effect-reference.md +86 -0
  359. package/skills/validate-urp-render-graph-renderer-feature/SKILL.md +92 -0
  360. package/skills/validate-urp-render-graph-renderer-feature/references/validation-checklist.md +179 -0
@@ -0,0 +1,851 @@
1
+ # LevelPlay SDK Initialization API
2
+
3
+ ## Contents
4
+ - [Overview](#overview)
5
+ - [Code Organization Options (Step 7)](#code-organization-options-step-7)
6
+ - [Version-Aware ILRD Init Wiring (Step 7)](#version-aware-ilrd-init-wiring-step-7)
7
+ - [Basic Initialization](#basic-initialization)
8
+ - [Advanced Initialization](#advanced-initialization)
9
+ - [API Reference](#api-reference)
10
+ - [Initialization Timing](#initialization-timing)
11
+ - [Best Practices](#best-practices)
12
+ - [Testing](#testing)
13
+ - [Migration from IronSource.* APIs](#migration-from-ironsource-apis)
14
+ - [Error Code Reference](#error-code-reference)
15
+
16
+ ## Overview
17
+
18
+ Proper SDK initialization is critical for LevelPlay to function correctly. This reference covers basic initialization, advanced options, and best practices.
19
+
20
+ ## Code Organization Options (Step 7)
21
+
22
+ Step 7 of SKILL.md asks the user how they want to handle initialization and presents four options. Full
23
+ implementation for each option follows. Present the four option labels exactly as written in SKILL.md;
24
+ use the code here once the user has chosen.
25
+
26
+ ### Option 1: Creating a New Script
27
+
28
+ **If you completed ATT in Step 6.5 (iOS):** Use the `LevelPlayInitializer.cs` from `references/ios-setup.md` (Part 3) instead of the template below — it already includes the `IEnumerator Start()` coroutine required for ATT and the `DontDestroyOnLoad` setup. Skip this code block and continue from the ILRD wiring below.
29
+
30
+ If creating a new script (e.g., `LevelPlayInitializer.cs`), use this complete class:
31
+
32
+ ```csharp
33
+ using UnityEngine;
34
+ using Unity.Services.LevelPlay;
35
+
36
+ public class LevelPlayInitializer : MonoBehaviour
37
+ {
38
+ [SerializeField] private string appKey;
39
+
40
+ void Awake()
41
+ {
42
+ // Persist across scene loads so ads stay initialized
43
+ DontDestroyOnLoad(gameObject);
44
+ }
45
+
46
+ void Start()
47
+ {
48
+ // Register initialization callbacks
49
+ LevelPlay.OnInitSuccess += OnInitSuccess;
50
+ LevelPlay.OnInitFailed += OnInitFailed;
51
+
52
+ // Initialize the SDK with your App Key
53
+ LevelPlay.Init(appKey);
54
+ }
55
+
56
+ private void OnInitSuccess(LevelPlayConfiguration config)
57
+ {
58
+ Debug.Log("LevelPlay SDK initialized successfully");
59
+ // SDK is now ready to load ads
60
+ }
61
+
62
+ private void OnInitFailed(LevelPlayInitError error)
63
+ {
64
+ Debug.LogError($"LevelPlay initialization failed: {error.ErrorMessage}");
65
+ }
66
+
67
+ void OnDestroy()
68
+ {
69
+ LevelPlay.OnInitSuccess -= OnInitSuccess;
70
+ LevelPlay.OnInitFailed -= OnInitFailed;
71
+ }
72
+ }
73
+ ```
74
+
75
+ **File location**: Save as `Assets/Scripts/LevelPlayInitializer.cs` (or `Assets/Scripts/Ads/LevelPlayInitializer.cs` if you have an Ads subfolder)
76
+
77
+ **After creating:**
78
+ 1. Attach script to a GameObject in your first scene
79
+ 2. In Unity Inspector, find the "App Key" field
80
+ 3. Paste your App Key from Step 5 into that field
81
+
82
+ ### Option 2: Adding to Existing Script
83
+
84
+ If adding to an existing script (e.g., `GameManager.cs`):
85
+
86
+ **1. Add namespace at top of file:**
87
+ ```csharp
88
+ using Unity.Services.LevelPlay;
89
+ ```
90
+
91
+ **2. In existing Start() or Awake() method, add initialization:**
92
+ ```csharp
93
+ void Start()
94
+ {
95
+ // Register initialization callbacks
96
+ LevelPlay.OnInitSuccess += OnInitSuccess;
97
+ LevelPlay.OnInitFailed += OnInitFailed;
98
+
99
+ // Initialize the SDK - REPLACE with your actual App Key from Step 5
100
+ LevelPlay.Init("YOUR_APP_KEY_HERE");
101
+
102
+ // ... your other existing Start() code
103
+ }
104
+ ```
105
+
106
+ **3. Add callback methods to class:**
107
+ ```csharp
108
+ private void OnInitSuccess(LevelPlayConfiguration config)
109
+ {
110
+ Debug.Log("LevelPlay SDK initialized successfully");
111
+ // SDK is ready - you can now create ad objects
112
+ }
113
+
114
+ private void OnInitFailed(LevelPlayInitError error)
115
+ {
116
+ Debug.LogError($"LevelPlay initialization failed: {error.ErrorMessage}");
117
+ }
118
+ ```
119
+
120
+ **4. In existing OnDestroy() (or create if it doesn't exist), add:**
121
+ ```csharp
122
+ void OnDestroy()
123
+ {
124
+ // Unregister callbacks
125
+ LevelPlay.OnInitSuccess -= OnInitSuccess;
126
+ LevelPlay.OnInitFailed -= OnInitFailed;
127
+ }
128
+ ```
129
+
130
+ Replace `"YOUR_APP_KEY_HERE"` with your actual App Key from Step 5 (the alphanumeric string copied from the LevelPlay dashboard).
131
+
132
+ **Note:** If your existing script doesn't already persist across scenes, add `DontDestroyOnLoad(gameObject);` to its `Awake()` method to prevent re-initialization when loading new scenes.
133
+
134
+ Before testing, double-check that you've replaced the placeholder with your actual App Key. The App Key should be an alphanumeric string, NOT 'YOUR_APP_KEY_HERE'.
135
+
136
+ ### Option 3: Separate Script Referenced by Manager
137
+
138
+ If you want to keep ads code in its own script that your existing manager references:
139
+
140
+ **1. Create `LevelPlayInitializer.cs` using the complete class code from Option 1.**
141
+
142
+ **2. Add the `LevelPlayInitializer` component to a GameObject in the Unity Editor** (at design time — not at runtime). Use a dedicated persistent GameObject (e.g. an "Ads" object in your first scene), and set its **App Key** field in the Inspector, exactly as in Option 1's "After creating" steps.
143
+
144
+ **3. Reference it from your existing manager** via a serialized field, so `GameManager` can coordinate with the initializer without creating it at runtime:
145
+ ```csharp
146
+ using UnityEngine;
147
+
148
+ public class GameManager : MonoBehaviour
149
+ {
150
+ // Assign the LevelPlayInitializer GameObject in the Inspector.
151
+ // Enter your App Key on the LevelPlayInitializer component itself (see step 2),
152
+ // NOT here — that keeps your ad credentials in one place where publishers expect them.
153
+ [SerializeField] private LevelPlayInitializer levelPlayInitializer;
154
+
155
+ void Awake()
156
+ {
157
+ // ... your other initialization code.
158
+ // LevelPlayInitializer initializes itself in its own Start();
159
+ // GameManager just holds a reference to it via the field above.
160
+ }
161
+ }
162
+ ```
163
+
164
+ This keeps ad code isolated in `LevelPlayInitializer.cs` while giving `GameManager` a reference to it.
165
+
166
+ > **Why not `gameObject.AddComponent<LevelPlayInitializer>()` at runtime?** The initializer reads its App Key from a `[SerializeField]` Inspector field. A component added at runtime never receives that Inspector value, so the App Key would be empty and initialization would fail. Attaching the component in the Editor (step 2) is what makes the App Key field available to fill in.
167
+
168
+ **Note:** `LevelPlayInitializer.Awake()` calls `DontDestroyOnLoad(gameObject)`, so the GameObject you attach it to persists across scenes. Put it on a dedicated Ads GameObject rather than on your `GameManager`, unless you intend `GameManager` to persist too.
169
+
170
+ ### Option 4: Just Show Me the Code
171
+
172
+ Provide the complete initialization code from Option 1 as a standalone snippet, without instructions for attaching to a GameObject or setting up the Inspector. Include a note: "This is the full initialization class — save it as `LevelPlayInitializer.cs`, attach it to a persistent GameObject in your first scene, and set the App Key field in the Inspector."
173
+
174
+ **Key points (all options):**
175
+ - Always register `OnInitSuccess` and `OnInitFailed` callbacks before calling `Init()`
176
+ - Call initialization early in app lifecycle (in `Awake()` or `Start()` of first scene)
177
+ - Only initialize once. If initialization script is in first scene and you have multiple scenes, add `DontDestroyOnLoad(gameObject);` in `Awake()` to prevent re-initialization when loading new scenes
178
+ - Wait for `OnInitSuccess` before creating ad objects
179
+
180
+ If initialization fails repeatedly, see `references/troubleshooting.md`. Common causes include incorrect App Key, no internet connection, or missing package dependencies.
181
+
182
+ ## Version-Aware ILRD Init Wiring (Step 7)
183
+
184
+ **If the user answered Yes or Not Sure to the ILRD question in Step 7**, wire up the impression-revenue
185
+ callback. **The correct approach depends on the user's SDK version** (check in **Ads Mediation > Network
186
+ Manager**):
187
+
188
+ **SDK 9.5.0+ (current): do NOT add anything to the initializer here.** In 9.5.0+, ILRD is delivered per
189
+ ad instance via the `OnAdImpressionDataReady` event on each ad object — it is wired when you create each
190
+ ad in Step 9 (see `references/ilrd-api.md`). The global `LevelPlay.OnImpressionDataReady` event still
191
+ exists but is **deprecated in 9.5.0+ and generates a compiler warning** — do not use it on 9.5.0+.
192
+
193
+ **SDK 9.4.x and earlier:** subscribe to the global `LevelPlay.OnImpressionDataReady` event before
194
+ `LevelPlay.Init()`. Add these lines inside `Start()` (before `LevelPlay.Init(appKey)`):
195
+
196
+ ```csharp
197
+ // SDK 9.4.x and earlier only. MUST be registered BEFORE LevelPlay.Init() to avoid
198
+ // losing early impressions. Callback fires on a BACKGROUND thread — see
199
+ // references/ilrd-api.md for thread-safe forwarding patterns and a Firebase example.
200
+ LevelPlay.OnImpressionDataReady += OnImpressionDataReady;
201
+ ```
202
+
203
+ Add this stub method to the class:
204
+
205
+ ```csharp
206
+ private void OnImpressionDataReady(LevelPlayImpressionData impressionData)
207
+ {
208
+ // See references/ilrd-api.md for full implementation.
209
+ // For now, just log so you can verify it fires:
210
+ Debug.Log($"ILRD: {impressionData.AdNetwork} / {impressionData.AdFormat} / ${impressionData.Revenue}");
211
+ }
212
+ ```
213
+
214
+ And unsubscribe in `OnDestroy()`:
215
+
216
+ ```csharp
217
+ LevelPlay.OnImpressionDataReady -= OnImpressionDataReady;
218
+ ```
219
+
220
+ **iOS path (SDK 9.4.x and earlier only):** if you used the `LevelPlayInitializer.cs` from
221
+ `references/ios-setup.md` Part 3, note that `Start()` is a coroutine with **no `LevelPlay.Init(appKey)`
222
+ call inside it** — initialization happens in `InitializeLevelPlay()`. Place the
223
+ `LevelPlay.OnImpressionDataReady += ...` line inside `InitializeLevelPlay()`, immediately **before**
224
+ `LevelPlay.Init(appKey)`, so it registers before the first impression.
225
+
226
+ For Option 2 (existing script) and Option 3 (separate script referenced by a manager), apply the same
227
+ version-aware wiring: on 9.4.x and earlier add the global subscription/stub/unsubscribe shown above; on
228
+ 9.5.0+ add nothing here (ILRD is wired per ad instance in Step 9). For Option 3, the wiring goes in
229
+ `LevelPlayInitializer.cs`, with no changes in `GameManager`.
230
+
231
+ **Next:** Once you confirm the log fires after your first ad impression, read `references/ilrd-api.md` to
232
+ wire it up to your actual analytics platform. Note: ILRD callbacks do not fire with mock ads in the
233
+ Unity Editor — you'll need a device build to verify this log fires (see Step 10).
234
+
235
+ ## Basic Initialization
236
+
237
+ ### Minimum Required Setup
238
+
239
+ ```csharp
240
+ using UnityEngine;
241
+ using Unity.Services.LevelPlay;
242
+
243
+ public class LevelPlayInitializer : MonoBehaviour
244
+ {
245
+ [SerializeField] private string appKey = "YOUR_APP_KEY";
246
+
247
+ void Start()
248
+ {
249
+ // Register initialization callbacks
250
+ LevelPlay.OnInitSuccess += OnInitSuccess;
251
+ LevelPlay.OnInitFailed += OnInitFailed;
252
+
253
+ // Initialize SDK
254
+ LevelPlay.Init(appKey);
255
+ }
256
+
257
+ void OnDestroy()
258
+ {
259
+ // Unregister callbacks
260
+ LevelPlay.OnInitSuccess -= OnInitSuccess;
261
+ LevelPlay.OnInitFailed -= OnInitFailed;
262
+ }
263
+
264
+ private void OnInitSuccess(LevelPlayConfiguration config)
265
+ {
266
+ Debug.Log("LevelPlay SDK initialized successfully");
267
+ // SDK is ready - you can now create ad objects
268
+ }
269
+
270
+ private void OnInitFailed(LevelPlayInitError error)
271
+ {
272
+ Debug.LogError($"LevelPlay initialization failed: {error.ErrorMessage}");
273
+ }
274
+ }
275
+ ```
276
+
277
+ **Key points:**
278
+ - Register `OnInitSuccess` and `OnInitFailed` callbacks before calling `Init()`
279
+ - The `appKey` is obtained from your LevelPlay dashboard
280
+ - Call `Init()` as early as possible (ideally in the first scene)
281
+ - Only create ad objects after `OnInitSuccess` fires
282
+
283
+ ## Advanced Initialization
284
+
285
+ ### With User ID
286
+
287
+ ```csharp
288
+ using UnityEngine;
289
+ using Unity.Services.LevelPlay;
290
+
291
+ public class AdvancedInitializer : MonoBehaviour
292
+ {
293
+ [SerializeField] private string appKey = "YOUR_APP_KEY";
294
+
295
+ void Start()
296
+ {
297
+ // Register callbacks
298
+ LevelPlay.OnInitSuccess += OnInitSuccess;
299
+ LevelPlay.OnInitFailed += OnInitFailed;
300
+
301
+ // Initialize SDK with optional user ID
302
+ string userId = "user_12345"; // Your internal user ID
303
+ LevelPlay.Init(appKey, userId);
304
+ }
305
+
306
+ void OnDestroy()
307
+ {
308
+ LevelPlay.OnInitSuccess -= OnInitSuccess;
309
+ LevelPlay.OnInitFailed -= OnInitFailed;
310
+ }
311
+
312
+ private void OnInitSuccess(LevelPlayConfiguration config)
313
+ {
314
+ Debug.Log("LevelPlay initialized successfully");
315
+ }
316
+
317
+ private void OnInitFailed(LevelPlayInitError error)
318
+ {
319
+ Debug.LogError($"Init failed: {error.ErrorMessage}");
320
+ }
321
+ }
322
+ ```
323
+
324
+ **When to use:** When you need to track users across sessions or implement server-side verification for rewards.
325
+
326
+ ### Complete Production-Ready Example
327
+
328
+ ```csharp
329
+ using UnityEngine;
330
+ using Unity.Services.LevelPlay;
331
+
332
+ public class ProductionLevelPlayInitializer : MonoBehaviour
333
+ {
334
+ [Header("Configuration")]
335
+ [SerializeField] private string appKey = "YOUR_APP_KEY";
336
+
337
+ void Awake()
338
+ {
339
+ // Ensure this object persists across scenes
340
+ DontDestroyOnLoad(gameObject);
341
+
342
+ // Initialize as early as possible
343
+ InitializeLevelPlay();
344
+ }
345
+
346
+ private void InitializeLevelPlay()
347
+ {
348
+ // Register initialization callbacks
349
+ LevelPlay.OnInitSuccess += OnInitSuccess;
350
+ LevelPlay.OnInitFailed += OnInitFailed;
351
+
352
+ // Initialize SDK with optional user ID
353
+ if (HasUserId())
354
+ {
355
+ string userId = GetUserId();
356
+ LevelPlay.Init(appKey, userId);
357
+ Debug.Log($"LevelPlay SDK initialization started with user ID: {userId}");
358
+ }
359
+ else
360
+ {
361
+ LevelPlay.Init(appKey);
362
+ Debug.Log("LevelPlay SDK initialization started");
363
+ }
364
+ }
365
+
366
+ void OnDestroy()
367
+ {
368
+ // Unregister callbacks
369
+ LevelPlay.OnInitSuccess -= OnInitSuccess;
370
+ LevelPlay.OnInitFailed -= OnInitFailed;
371
+ }
372
+
373
+ private void OnInitSuccess(LevelPlayConfiguration config)
374
+ {
375
+ Debug.Log("LevelPlay SDK initialization completed");
376
+
377
+ // SDK is ready - create ad objects here
378
+ CreateAdObjects();
379
+ }
380
+
381
+ private void OnInitFailed(LevelPlayInitError error)
382
+ {
383
+ Debug.LogError($"LevelPlay initialization failed: {error.ErrorMessage}");
384
+
385
+ // Optionally retry initialization after delay
386
+ Invoke(nameof(RetryInitialization), 5f);
387
+ }
388
+
389
+ private void RetryInitialization()
390
+ {
391
+ Debug.Log("Retrying LevelPlay initialization...");
392
+ LevelPlay.Init(appKey);
393
+ }
394
+
395
+ private bool HasUserId()
396
+ {
397
+ // Check if user is logged in and has an ID
398
+ return !string.IsNullOrEmpty(PlayerPrefs.GetString("UserID", ""));
399
+ }
400
+
401
+ private string GetUserId()
402
+ {
403
+ // Get your internal user ID
404
+ return PlayerPrefs.GetString("UserID", "");
405
+ }
406
+
407
+ private void CreateAdObjects()
408
+ {
409
+ // Create your ad objects here after init succeeds
410
+ // Example:
411
+ // rewardedAd = new LevelPlayRewardedAd("rewarded_ad_unit_id");
412
+ // interstitialAd = new LevelPlayInterstitialAd("interstitial_ad_unit_id");
413
+ Debug.Log("Creating ad objects...");
414
+ }
415
+ }
416
+ ```
417
+
418
+ ## API Reference
419
+
420
+ ### Core Methods
421
+
422
+ #### `LevelPlay.Init(string appKey, string userId = null)`
423
+ Initialize the LevelPlay SDK.
424
+
425
+ **Parameters:**
426
+ - `appKey`: Your application key from LevelPlay dashboard
427
+ - `userId` (optional): Your internal user ID for tracking and server-side reward verification
428
+
429
+ **Usage:**
430
+ ```csharp
431
+ // Basic initialization
432
+ LevelPlay.Init("your_app_key");
433
+
434
+ // With user ID
435
+ LevelPlay.Init("your_app_key", "user_12345");
436
+ ```
437
+
438
+ **Important:** Register `OnInitSuccess` and `OnInitFailed` callbacks before calling `Init()`.
439
+
440
+ **When to use user ID:**
441
+ - Server-side reward verification
442
+ - User-level analytics
443
+ - Cross-session tracking
444
+
445
+ #### `LevelPlay.SetSegment(LevelPlaySegment segment)`
446
+ Set user segmentation data for improved ad targeting and reporting.
447
+
448
+ **Parameters:**
449
+ - `segment`: A `LevelPlaySegment` object containing user segment information
450
+
451
+ **Usage:**
452
+ ```csharp
453
+ // Create a segment with user data
454
+ var segment = new LevelPlaySegment();
455
+ segment.SegmentName = "high_spenders";
456
+ segment.Level = 25;
457
+ segment.UserCreationDate = 1609459200000; // Unix timestamp in milliseconds (Jan 1, 2021)
458
+ segment.IapTotal = 49.99;
459
+ segment.IsPaying = 1; // 0 or 1
460
+
461
+ // Set custom parameters
462
+ segment.SetCustom("vip_tier", "gold");
463
+ segment.SetCustom("gameplay_hours", "150");
464
+
465
+ // Apply segment before or after initialization
466
+ LevelPlay.SetSegment(segment);
467
+ ```
468
+
469
+ **When to call:**
470
+ - Can be called before or after SDK initialization
471
+ - Update whenever user segment changes (level up, first purchase, etc.)
472
+ - Helps LevelPlay optimize ad delivery and reporting
473
+
474
+ **LevelPlaySegment properties:**
475
+ - `SegmentName` (string): Name of the segment (e.g., "high_spenders", "casual_players")
476
+ - `Level` (int): User's current level in the game
477
+ - `UserCreationDate` (long): Unix timestamp of when user created their account
478
+ - `IapTotal` (double): Total amount spent on in-app purchases
479
+ - `IsPaying` (int): Whether the user has made any purchases (0 or 1)
480
+
481
+ **LevelPlaySegment methods:**
482
+ - `SetCustom(string key, string value)`: Add custom key-value parameters for advanced segmentation
483
+
484
+ **Custom parameter limits:**
485
+ - Maximum 5 custom parameters per segment
486
+
487
+ **Best practices:**
488
+ - Update segments when significant user milestones occur
489
+ - Use meaningful segment names that describe user behavior
490
+ - Keep custom parameters descriptive and consistent
491
+ - Stay within the 5 custom parameter limit per segment
492
+
493
+ #### `LevelPlay.SetPauseGame(bool pause)`
494
+ Pause Unity 3D game activities (except ad callbacks) during ad presentation.
495
+
496
+ **Platform:** iOS only (SDK 8.5.0+)
497
+
498
+ **Parameters:**
499
+ - `pause`: Set to `true` to pause game activities during ads
500
+
501
+ **Usage:**
502
+ ```csharp
503
+ LevelPlay.SetPauseGame(true);
504
+ ```
505
+
506
+ **Notes:**
507
+ - iOS only
508
+ - Can be called once per session, before or after SDK initialization
509
+ - Game resumes automatically when ad closes
510
+ - Affects Rewarded and Interstitial ads
511
+
512
+ #### `LevelPlay.SetMetaData(string key, params string[] values)`
513
+ Set metadata for SDK configuration.
514
+
515
+ **Parameters:**
516
+ - `key`: The metadata key
517
+ - `values`: Array of values
518
+
519
+ **Use Cases:**
520
+
521
+ **1. Server-to-Server Rewarded Callbacks (SDK 8.11.0+)**
522
+
523
+ Pass custom parameters for rewarded ad callbacks:
524
+
525
+ ```csharp
526
+ LevelPlay.SetMetaData("LevelPlay_Rewarded_Server_Params", new [] { "key1=value1", "key2=value2" });
527
+ ```
528
+
529
+ **2. Test Suite Activation**
530
+
531
+ Enable the LevelPlay Test Suite:
532
+
533
+ ```csharp
534
+ LevelPlay.SetMetaData("is_test_suite", "enable");
535
+ LevelPlay.Init(appKey);
536
+ ```
537
+
538
+ **Note:** For Test Suite, must be called before `Init()`.
539
+
540
+ #### `LevelPlay.SetDynamicUserId(string userId)`
541
+ Set a dynamic user ID that can be changed during the session for server-side rewarded ad verification.
542
+
543
+ **Parameters:**
544
+ - `userId`: The dynamic user ID to set
545
+
546
+ **Returns:** `bool` - true if successfully set, false otherwise
547
+
548
+ **Usage:**
549
+ ```csharp
550
+ string newUserId = "user_67890";
551
+ bool success = LevelPlay.SetDynamicUserId(newUserId);
552
+ if (success)
553
+ {
554
+ Debug.Log($"Dynamic user ID set to: {newUserId}");
555
+ }
556
+ ```
557
+
558
+ **When to use:**
559
+ - Server-side reward verification for rewarded ads
560
+ - When user ID changes mid-session (e.g., user logs in after guest play)
561
+ - Must be set before showing rewarded ads that require verification
562
+
563
+ **Important:** This is different from the userId passed to `Init()`. The dynamic user ID can be changed during the session and is used specifically for server-to-server reward callbacks.
564
+
565
+ #### `LevelPlay.LaunchTestSuite()`
566
+ Launch the LevelPlay Test Suite for testing ad integrations on device.
567
+
568
+ **Usage:**
569
+ ```csharp
570
+ void OnInitSuccess(LevelPlayConfiguration config)
571
+ {
572
+ Debug.Log("SDK initialized");
573
+
574
+ #if UNITY_EDITOR || DEVELOPMENT_BUILD
575
+ // Launch Test Suite for testing
576
+ LevelPlay.LaunchTestSuite();
577
+ #endif
578
+ }
579
+ ```
580
+
581
+ **Requirements:**
582
+ - SDK must be initialized before calling this method
583
+ - Test Suite must be enabled via metadata before initialization:
584
+ ```csharp
585
+ LevelPlay.SetMetaData("is_test_suite", "enable");
586
+ LevelPlay.Init(appKey);
587
+ ```
588
+
589
+ **When to use:**
590
+ - Testing ad networks on real devices
591
+ - Verifying ad fill and display for different networks
592
+ - Debugging ad integration issues
593
+ - QA testing before release
594
+
595
+ **Notes:**
596
+ - Opens a UI overlay with test controls
597
+ - Allows testing each ad network individually
598
+ - Only available on device builds (not Editor)
599
+ - Should be removed or disabled in production builds
600
+
601
+ #### `LevelPlay.SetAdaptersDebug(bool enabled)`
602
+ Enable or disable debug logging for ad network adapters.
603
+
604
+ **Parameters:**
605
+ - `enabled`: Set to `true` to enable adapter debug logs, `false` to disable
606
+
607
+ **Usage:**
608
+ ```csharp
609
+ void Awake()
610
+ {
611
+ #if UNITY_EDITOR || DEVELOPMENT_BUILD
612
+ // Enable adapter debug logs for development
613
+ LevelPlay.SetAdaptersDebug(true);
614
+ #endif
615
+
616
+ LevelPlay.OnInitSuccess += OnInitSuccess;
617
+ LevelPlay.Init(appKey);
618
+ }
619
+ ```
620
+
621
+ **When to use:**
622
+ - Debugging ad network integration issues
623
+ - Investigating ad load failures
624
+ - Understanding adapter behavior
625
+ - Development and QA testing
626
+
627
+ **Notes:**
628
+ - Increases console log verbosity
629
+ - Helps diagnose network-specific issues
630
+ - Should be disabled in production builds
631
+ - Can be called before or after SDK initialization
632
+
633
+ #### `LevelPlay.SetNetworkData(string networkKey, string networkData)`
634
+ Set custom data for specific ad networks.
635
+
636
+ **Parameters:**
637
+ - `networkKey`: The ad network identifier (e.g., "UnityAds", "AdMob")
638
+ - `networkData`: Custom data string for the network
639
+
640
+ **Usage:**
641
+ ```csharp
642
+ // Set custom network-specific configuration
643
+ LevelPlay.SetNetworkData("UnityAds", "customValue");
644
+ LevelPlay.SetNetworkData("AdMob", "extraConfig");
645
+ ```
646
+
647
+ **When to use:**
648
+ - Passing custom configuration to specific ad networks
649
+ - Advanced network-specific setup
650
+ - When network adapter requires additional data
651
+
652
+ **Notes:**
653
+ - Call before SDK initialization
654
+ - Consult individual network adapter documentation for supported data
655
+ - Not commonly needed for standard integrations
656
+
657
+ ### Events
658
+
659
+ #### `LevelPlay.OnInitSuccess`
660
+ Fired when SDK initialization completes successfully.
661
+
662
+ **Signature:** `event Action<LevelPlayConfiguration>`
663
+
664
+ **Usage:**
665
+ ```csharp
666
+ LevelPlay.OnInitSuccess += (config) =>
667
+ {
668
+ Debug.Log("SDK ready");
669
+ Debug.Log($"Unity Version: {LevelPlay.UnityVersion}");
670
+ Debug.Log($"Plugin Version: {LevelPlay.PluginVersion}");
671
+ // Create ad objects here
672
+ };
673
+ ```
674
+
675
+ **Note:** `UnityVersion` and `PluginVersion` are static properties on the `LevelPlay` class, not on `LevelPlayConfiguration`.
676
+
677
+ #### `LevelPlay.OnInitFailed`
678
+ Fired when SDK initialization fails.
679
+
680
+ **Signature:** `event Action<LevelPlayInitError>`
681
+
682
+ **Usage:**
683
+ ```csharp
684
+ LevelPlay.OnInitFailed += (error) =>
685
+ {
686
+ Debug.LogError($"Init failed: Code {error.ErrorCode}, Message: {error.ErrorMessage}");
687
+ // Optionally retry
688
+ };
689
+ ```
690
+
691
+ **LevelPlayInitError properties:**
692
+ - `error.ErrorCode`: Numeric error code
693
+ - `error.ErrorMessage`: Description of the initialization error
694
+
695
+ ## Initialization Timing
696
+
697
+ ### Early Initialization (Recommended)
698
+
699
+ Initialize in your first scene, as early as possible:
700
+
701
+ ```csharp
702
+ void Awake()
703
+ {
704
+ DontDestroyOnLoad(gameObject);
705
+
706
+ LevelPlay.OnInitSuccess += OnInitSuccess;
707
+ LevelPlay.OnInitFailed += OnInitFailed;
708
+ LevelPlay.Init(appKey);
709
+ }
710
+ ```
711
+
712
+ **Why:** Ads start loading immediately, maximizing availability when needed.
713
+
714
+ ### Delayed Initialization (Advanced)
715
+
716
+ In some cases, you might delay initialization:
717
+
718
+ ```csharp
719
+ void Start()
720
+ {
721
+ // Wait for user to complete onboarding first
722
+ StartCoroutine(InitializeAfterOnboarding());
723
+ }
724
+
725
+ IEnumerator InitializeAfterOnboarding()
726
+ {
727
+ yield return new WaitUntil(() => HasCompletedOnboarding());
728
+
729
+ // Now initialize
730
+ LevelPlay.OnInitSuccess += OnInitSuccess;
731
+ LevelPlay.OnInitFailed += OnInitFailed;
732
+ LevelPlay.Init(appKey);
733
+ }
734
+ ```
735
+
736
+ **When to use:**
737
+ - Waiting for user consent decisions
738
+ - Completing critical onboarding first
739
+ - Reducing initial app load time
740
+
741
+ **Trade-off:** Ads won't be ready as quickly.
742
+
743
+ ## Best Practices
744
+
745
+ 1. **Initialize early**: Call `Init()` in your first scene's `Awake()` or `Start()`
746
+ 2. **Persist the initializer**: Use `DontDestroyOnLoad()` to prevent re-initialization
747
+ 3. **Register callbacks first**: Always register `OnInitSuccess` and `OnInitFailed` before calling `Init()`
748
+ 4. **Create ads after init**: Only create ad objects after `OnInitSuccess` fires
749
+ 5. **Set user ID if available**: Helps with analytics and server-side verification
750
+ 6. **Initialize only once**: Don't re-initialize the SDK across scenes
751
+ 7. **Handle failures**: Implement `OnInitFailed` to catch and log initialization errors
752
+
753
+ ## Testing
754
+
755
+ ### Development Checklist
756
+ - [ ] SDK initializes successfully (check logs)
757
+ - [ ] `OnInitSuccess` callback fires
758
+ - [ ] Ads can be created after initialization
759
+ - [ ] User ID is set correctly (if used)
760
+ - [ ] Initialization happens early in app lifecycle
761
+ - [ ] Error handling works (`OnInitFailed` implemented)
762
+
763
+ ### Common Issues
764
+
765
+ **Issue: Ads not loading after initialization**
766
+ - Check that App Key is correct
767
+ - Verify ad objects are created **after** `OnInitSuccess` fires
768
+ - Check console for initialization errors
769
+ - Enable test mode in LevelPlay dashboard
770
+
771
+ **Issue: Initialization fails**
772
+ - Verify App Key matches LevelPlay dashboard exactly
773
+ - Check internet connectivity
774
+ - Look at `LevelPlayInitError.ErrorMessage` for specific error
775
+ - Ensure LevelPlay SDK package is properly installed
776
+
777
+ **Issue: User ID not being tracked**
778
+ - Verify user ID is passed to `Init(appKey, userId)` as the second parameter
779
+ - Check that user ID is non-empty and unique
780
+ - Verify format meets LevelPlay requirements (alphanumeric, max 64 chars)
781
+
782
+ **Issue: Ads not ready when needed**
783
+ - Initialize earlier in the app lifecycle
784
+ - Create ad objects immediately in `OnInitSuccess`
785
+ - Load ads immediately after creating ad objects
786
+
787
+ ## Migration from IronSource.* APIs
788
+
789
+ > **Full migration guide:** for SDK upgrade paths, per-format ad unit API migration, the migration completeness checklist, Unity Ads migration, and Maven Central build failures, see `references/migration-sdk-9.md`. The summary below covers initialization only.
790
+
791
+ If you're migrating from deprecated IronSource APIs:
792
+
793
+ **Old (Deprecated):**
794
+ ```csharp
795
+ IronSource.Agent.validateIntegration();
796
+ IronSource.Agent.init(appKey);
797
+ ```
798
+
799
+ **New (Current):**
800
+ ```csharp
801
+ LevelPlay.OnInitSuccess += OnInitSuccess;
802
+ LevelPlay.OnInitFailed += OnInitFailed;
803
+ LevelPlay.Init(appKey);
804
+ ```
805
+
806
+ **Key differences:**
807
+ - Init errors are reported via `OnInitFailed`; for integration validation use the LevelPlay Test Suite (`LaunchTestSuite()`)
808
+ - Must register callbacks before calling `Init()`
809
+ - Ad objects created explicitly after initialization (not automatic background loading)
810
+
811
+ ## Error Code Reference
812
+
813
+ When ad operations fail, `LevelPlayAdError` contains an `ErrorCode` property with one of these values:
814
+
815
+ > **Note:** Code **508** is an initialization/mediation-level error, surfaced via `LevelPlayInitError` in the `OnInitFailed` callback — not via a per-ad `LevelPlayAdError` (hence "N/A" in the Ad Formats column). All other codes below are per-ad errors delivered through `LevelPlayAdError` in the ad load/show failure callbacks.
816
+
817
+ | Code | Ad Formats | Description |
818
+ |------|-----------|-------------|
819
+ | **508** | N/A | Init failure of mediation/Network, Calling Demand Only API in non Demand Only mode, Calling non Demand Only API in Demand Only mode |
820
+ | **509** | Interstitial, Rewarded | Show Fail: No ads to show |
821
+ | **510** | Interstitial, Rewarded, Banner | Load Fail: Server response failed |
822
+ | **520** | Interstitial, Rewarded | Show Fail: No internet connection; ShouldTrackNetworkState is enabled |
823
+ | **524** | Interstitial, Rewarded | Show Fail: Placement has reached its limit as defined per pace or capping limit |
824
+ | **526** | Interstitial, Rewarded | Show Fail: Ad unit has reached its daily cap per session |
825
+ | **604** | Banner | Can't load because the placement is capped |
826
+ | **605** | Banner | Unexpected exception while loading the banner |
827
+ | **606** | Banner | No banner fill on all the networks on the first load |
828
+ | **1007** | Interstitial, Rewarded | Auction Fail: Auction request did not contain all required information |
829
+ | **1022** | Rewarded | Show Fail: Cannot show a rewarded ad while another rewarded ad is showing |
830
+ | **1023** | Rewarded | Show Fail: Show called when there are no available ads to show |
831
+ | **1035** | Interstitial | Empty Waterfall |
832
+ | **1036** | Interstitial | Show Fail: Cannot show an interstitial while another interstitial is showing |
833
+ | **1037** | Interstitial | Load Fail: Cannot load an interstitial while another interstitial is loading |
834
+
835
+ **Usage in error callbacks:**
836
+ ```csharp
837
+ private void OnAdLoadFailed(LevelPlayAdError error)
838
+ {
839
+ Debug.LogWarning($"Ad load failed: Code {error.ErrorCode}, Message: {error.ErrorMessage}");
840
+
841
+ // Handle specific errors
842
+ if (error.ErrorCode == 510)
843
+ {
844
+ // Server response failed - retry with backoff
845
+ }
846
+ else if (error.ErrorCode == 520)
847
+ {
848
+ // No internet connection - wait for connectivity
849
+ }
850
+ }
851
+ ```