Skip to content

Instrument a Unity project with Claude Code

This recipe uses the Cognitive3D SDK implementation skill in Claude Code to plan what to track in a Unity project and then add the tracking code.

Use it for a new integration or for a project that already has some Cognitive3D tracking. You get a tracking plan that matches your goals instead of a list of every event you could record.

Before you start

  • Make sure Claude Code has access to your Unity project folder. The simplest way is to start Claude Code in that folder.
  • Install the cognitive3d-sdk-implementation plugin. See Claude Code plugins and skills.

You do not need to set up the Cognitive3D SDK first. If it is not installed, the skill sets it up with you.

Steps

  1. Ask Claude for help in your own words, or invoke the skill directly with /cognitive3d-sdk-implementation.

    Help me add the Cognitive3D SDK to this project.

    Claude loads the skill, identifies the engine from your project, and checks whether the SDK is already installed. You do not need to ask for a plan. The skill starts with one by default.

  2. Answer the discovery questions. The skill asks what your application is for, what decisions the data should support, who will read it, and what a successful session looks like. Short answers are fine.

  3. Review the tracking plan. The plan is phased, so the first phase is small enough to ship and check. For each item, it says whether it is a custom event, a session property, a sensor, a Dynamic Object, an ExitPoll survey, an objective, or a zone.

  4. Ask Claude to implement the first phase.

    Implement phase 1.

    Claude writes the code in your project and follows the conventions it finds there. Review the changes as you would any other code change.

  5. Do the steps that Claude describes but cannot do for you:

    • Editor setup, such as adding components and configuring them in the Inspector.
    • Scene and Dynamic Object mesh uploads, which use your developer key.
  6. Choose how to create objectives, ExitPoll question sets, and zones. The skill asks whether you want to create them on the dashboard or through the MCP Server, and does not change anything on the platform until you choose.

  7. Record a test session and check it on the dashboard before you start the next phase.

Things to know

  • If your project already has Cognitive3D tracking, the skill detects it and audits what is there first. It shows you what is working and what is missing, then asks whether you want it to propose improvements.
  • The skill keeps a progress tracker file in your project. It records what was implemented, so you can stop and pick the work up again later. If you run into trouble, send us the progress tracker when you contact support.
  • The skill checks the plan against what the Unity SDK can capture on your target platform, and tells you when something in your request is not possible.
  • The skill avoids recording data the SDK already captures, such as session start and end.
  • The same skill works for Unreal Engine, visionOS, Android XR, WebXR, and C++ projects. The steps are the same, but the editor work differs.

See also

intercom If you have a question or any feedback about our documentation please use the Intercom button (purple circle) in the lower right corner of any web page or join our Discord.