# A Unity UI Toolkit handoff checklist for AI agents

> For an Envy UI in Unity, give the agent the exported package, document, contract and target project. Have it load the document, connect game-owned data and events, and test the result in Play mode and on target devices.

Source: https://envyui.com/blog/unity-ai-ui-handoff-checklist
Editorial date: 2026-10-29

A Unity UI handoff needs more than a screenshot and a request to “make this work.” Give the agent the actual interface, the runtime that reads it and the names of the data and actions it must connect.

## Prepare the package

Envy's [Unity runtime](/docs/unity) requires Unity 6.3 or newer. Export the **Unity package** from **Hand off** and follow the installation steps in the runtime guide. The package includes a document and a demo. Try the demo in Play mode before asking the agent to connect your game.

For an agent, also export the [AI handoff package](/docs/handoff). It includes `contract.json`, instructions and generated starting code. Reference renders are optional, so include them if the review needs an image of each screen. Provide the actual game project instructions and identify the scene or controller the agent may change.

## Define the boundary

For an example health display, the game sends `player.hp` and `player.hpMax`. For a new-game button, the UI might emit `new_game_requested`. These are illustrative names: use the exported contract for the real document.

In the Envy Unity API, the integration loads an `EnvyDocument` with `LoadDocument()`, supplies values with `SetData()` and receives UI events through `UiEvent`. `FocusFirstButton()` can establish initial navigation. The runtime builds UI Toolkit elements from the document; it does not implement your game's save, combat or scene-transition rules.

## Give the agent a bounded task

```text
Read the Unity project instructions and Envy handoff package.
Load the supplied document with EnvyUI in the designated scene.
Use contract.json for all event names and data paths. Connect
the main menu to the existing game flow and supply initial data.
Do not replace the layout with a hand-built copy.

Run the project checks available here. In Play mode, verify the
first focused button, the primary action, cancel behavior and an
updated data value. Report unhandled events and checks not run.
```

Review the generated controller for empty event cases. A handler that logs the event can help diagnose wiring, but it does not complete an action. Connect the event to the existing game system and verify the resulting behavior.

## Test the integration

Check the initial screen, real data updates, keyboard navigation and the controller devices the game supports. Compare the reference render and Unity at the same viewport and values. Check fonts, clipping and readable text at the target resolution.

The Unity runtime can hot reload `.envy.json` while running in the Unity editor. That is a development feature; built players do not hot reload. Check [runtime differences](/docs/differences#unity) and test an actual build when the task calls for it. Envy's [agent page](/ai) explains the broader handoff workflow, and our [Unity MCP setup guide](/blog/unity-mcp-setup-claude-code-codex) covers pairing a Unity editor MCP server with Envy MCP.

## Questions people ask

### Does Envy generate a Unity UI that must be maintained separately?

The Envy Unity runtime reads the UI document and builds UI Toolkit elements at runtime. Game-specific code still supplies data and handles events.

### Which Unity version does the Envy runtime require?

The documented minimum is Unity 6.3. Consult the runtime guide for the tested version and current limitations.

### Is the generated Unity controller a complete game integration?

No. It is a starting point based on the contract. The project still needs real game data, event handlers and tests.
