Skip to main content

AI Chat Context Options

The Studio code editor has a built-in AI Assistant, a co-developer that knows the Captic engine. You don't have to copy scene data into an outside AI tool. Instead, select context options and the assistant receives exactly the parts of your world it needs.

Each option gives the assistant a view into the current state of your scene, so it can write code that fits it, find logic bugs, and propose actions such as a world-settings patch.

Keep context small

Select only what the question needs. Every selected option is sent with each message, so less context means faster and cheaper answers.

Code from the editor​

  • Include file as reference context: sends the script open in the editor.
  • Highlighted selection: if you select code first, only that selection is sent, so you can ask about one function without sending the whole file.

Engine context objects​

1. Environment Settings (roomsattr)​

What it is: The core configuration of the world: spawn point, sky, lighting, environment map, ground, navmesh and auto-respawn settings.

What the AI can do with it: If you ask "How do I change the sky colour?" or "Why am I spawning underground?", the assistant can see your useSky and spawnPoint values and propose the exact patch, without guessing your current values.

2. 3D Scene Graph (glbmodelsattr)​

What it is: Every entity placed in the world (models, primitives, lights, media) with its position, rotation, scale and components.

What the AI can do with it: Ask "Write a script that makes the red cube orbit around the podium" and the assistant finds the real ids of the cube and the podium in your scene and writes a script for them.

3. Inline Global Scripts (componentsattr)​

What it is: The source of scripts attached at scene level rather than to one entity. They often handle networking or global state.

What the AI can do with it: If a door script doesn't trigger a global state change, the assistant can compare your entity script with the global scripts and find where they disagree.

4. Custom Code Components (components)​

What it is: The custom components registered in this world, such as physics colliders, interactive assistants or player controllers.

What the AI can do with it: When a new script needs to call an existing component, the assistant sees which components and schemas really exist (AFRAME.components[...]) and doesn't invent ones that don't.

Visual context​

  • Attach screenshot: sends a screenshot of the 3D scene with your next message.
  • Attach 360° panorama: sends a full 360° view from your position, with your avatar hidden.
  • Allow AI 360° Auto-Capture: lets the assistant take a 360° view by itself when it needs to see the scene.

Next: let the assistant apply changes​

The assistant can propose world-settings patches and code replacements that you apply with one click. See AI Assistant Actions.