For the complete documentation index, see llms.txt. This page is also available as Markdown.

Setup for SDK Initialization

To make sure the Coda SDK is ready to handle payments as soon as your game starts, you must add the Coda SDK Prefab to the very first scene that loads. If you skip this step, the SDK won’t initialize at runtime — meaning payment flows and event listeners will not work.

Step 1: Add Coda SDK Prefab

Adding the Coda SDK Prefab into your game allows the SDK to initialize at runtime. One way to do this is by adding the Prefab to a scene.

1. Only if your project has multiple scenes:

  • Open Your First Scene

    • This is the scene that loads immediately when your game starts.

    • If you’re not sure, check your Build Settings (File → Build Settings) and see which scene is listed first.

    • Open that scene in the Unity Editor.

(If your project has only one scene, skip this step — you’ll just add the prefab directly to that default open scene.)

2. Add the Coda SDK Prefab

You can do this in either of two ways:

  • From the Menu: Go to Coda → Create Prefab

  • Drag & Drop:

    1. In the Project panel, navigate to: Assets → Plugins → Coda → Prefabs

    2. Drag the Coda.prefab into the Hierarchy panel

💡 Best Practice: If your game uses multiple scenes, place the prefab in a persistent “bootstrap” scene that always loads first. This ensures the SDK is initialized before any gameplay or UI that might trigger a payment.

Last updated

Was this helpful?