---
title: Add context to a prompt
product: Unity Spark
canonical: https://docs.unity.com/en-us/unity-spark/create/assistant/context-files/add-context
last_updated: 2026-12-01
generated_at: 2026-12-01T21:09:16.527Z
locale: en-us
---

# Add context to a prompt

> Mention objects, components, and assets, drag items into the Chat window, and attach images and files so the assistant knows what you're referring to.

Give the assistant the exact objects, assets, and files you're referring to. For more information about how the assistant uses context, refer to [Introduction to assistant context](/unity-spark/create/assistant/context-files/about-context.md).

## Mention objects, components, and assets

To point the assistant to an object, [component](/unity-spark/create/build/components/about-components.md), or asset in your scene:

1. Open the [Chat window](/unity-spark/create/assistant/chat-window-reference.md).
2. In the prompt box, enter `@` or select **Add context** (**@**).
3. Search for the item, then select it.

The picker has the following sections: **Current selection**, **Components of object**, **Scene hierarchy**, and **Project assets**. **Project assets** appear after you start typing. Each section lists up to 25 results, so keep typing to narrow the list.

When you select an item from `@`, Unity Spark puts the item's name in your message and adds the item as a context item over the text box, for example, `Make @Door open when @Player gets close.` When you select an item from **Add context**, Unity Spark adds only the context item.

The assistant can then read the item's properties, components, and scripts.

## Drag objects in

Drag an object from the [Hierarchy window](/unity-spark/create/build/objects-prefabs/hierarchy-window-reference.md), or an asset from the [Project window](/unity-spark/create/assets/manage/project-window-reference.md), onto the prompt box in the **Chat** window. While you drag over the prompt box, it displays `Drop to add context`. You can also drop files on the prompt box to attach them, or drop text.

## Attach images and files

To give the assistant images and files from your computer:

1. Open the **Chat** window.
2. Do one of the following:
   * In the prompt box, select **Attach file…**, then select a file.
   * Paste an image from the clipboard.
   * Drag files onto the **Chat** window.


**An image attached to a message in the Chat window.:**
![The prompt composer with an attached image named avatar-rat.png over the message Add this avatar to the main character's icon.](/api/media?file=/unity-spark/media/images/avatar.png)

You can attach several files of any type at once. Attachments work as follows:

* The assistant reads images directly. Attach images such as concept art, a reference screenshot, or a mock-up of your UI.
* It opens other files when it needs them. For very long files, it reads only about the first 100,000 characters.
* Unity Spark doesn't keep attachments if you reload the page before you send the message.

## Additional resources

* [Introduction to assistant context](/unity-spark/create/assistant/context-files/about-context.md)
* [Draw on the scene with Annotate](/unity-spark/create/assistant/context-files/annotate.md)
* [Add files to your project](/unity-spark/create/assets/add-files.md)
* [Asset library](/unity-spark/create/assets/assets.md)
