# microsoft/mixedrealitytoolkit-unity architecture

> Architecture diagram of the GitHub repository microsoft/mixedrealitytoolkit-unity, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/microsoft/mixedrealitytoolkit-unity
- Repository: https://github.com/microsoft/mixedrealitytoolkit-unity

## Overview

MRTK-Unity is a legacy Unity framework for cross-platform mixed-reality app development. Its principal workflow is that a Unity developer configures MRTK and a supported XR device/provider supplies input; MRTK exposes input and spatial-interaction building blocks for an app’s experience. The README also highlights in-editor simulation and replaceable core components. The supplied source excerpts cover only repository scripts, not the runtime implementation, so runtime links below are documented high-level relationships or marked unverified rather than inferred calls.

Main entry points: [`Assets/MRTK`](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK) (MRTK framework), [`Assets/MRTK/Core/Definitions/InputSystem`](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/Definitions/InputSystem) (Input system), [`Assets/MRTK/Core/Definitions/SpatialAwareness`](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/Definitions/SpatialAwareness) (Spatial awareness), [`Assets/MRTK/Core/Definitions`](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/Definitions) (Toolkit profiles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_configuration["Framework Configuration"]
  node_framework["MRTK framework"]
  node_profiles["Toolkit profiles"]
  node_serviceconfig["Service configuration"]
end

subgraph group_input["Input and Tracking"]
  node_inputsystem["Input system"]
  node_deviceprofiles["Device definitions"]
  node_inputevents["Input events"]
  node_handtracking["Hand tracking"]
end

subgraph group_interaction["Spatial Experience"]
  node_spatial["Spatial awareness"]
  node_boundary["Boundary system"]
  node_physics["Spatial queries"]
  node_ui["Spatial UI building blocks"]
end

subgraph group_platform["Platform Integration"]
  node_simulation["Editor simulation"]
  node_platformsupport["Device support"]
end

node_developer(("Unity developer"))
node_unityapp["Unity app"]
node_xrproviders["XR providers"]

node_developer -->|"develops in"| node_unityapp
node_developer -->|"uses"| node_framework
node_framework -.->|"configurable through"| node_profiles
node_profiles -.->|"configures services"| node_serviceconfig
node_xrproviders -.->|"provides device input"| node_deviceprofiles
node_framework -->|"provides input"| node_inputsystem
node_inputsystem -.->|"dispatches events"| node_inputevents
node_inputsystem -.->|"supports devices"| node_deviceprofiles
node_framework -->|"supports hand tracking"| node_handtracking
node_framework -->|"provides spatial interaction"| node_spatial
node_spatial -.->|"supports boundaries"| node_boundary
node_spatial -.->|"supports spatial queries"| node_physics
node_framework -->|"provides UI building blocks"| node_ui
node_developer -->|"prototypes with"| node_simulation
node_framework -->|"supports XR platforms"| node_platformsupport
node_unityapp -.->|"integrates"| node_framework

click node_framework "https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK"
click node_profiles "https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/Definitions"
click node_serviceconfig "https://github.com/microsoft/mixedrealitytoolkit-unity/blob/main/Assets/MRTK/Core/Definitions/MixedRealityServiceConfiguration.cs"
click node_inputsystem "https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/Definitions/InputSystem"
click node_deviceprofiles "https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/Definitions/Devices"
click node_inputevents "https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/EventDatum/Input"
click node_handtracking "https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/Definitions/SpatialAwareness"
click node_spatial "https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/Definitions/SpatialAwareness"
click node_boundary "https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/Definitions/BoundarySystem"
click node_physics "https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/Definitions/Physics"
click node_ui "https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK"
click node_simulation "https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK"
click node_platformsupport "https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/XR"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_framework,node_profiles,node_serviceconfig toneBlue
class node_inputsystem,node_deviceprofiles,node_inputevents,node_handtracking toneAmber
class node_spatial,node_boundary,node_physics,node_ui toneMint
class node_simulation,node_platformsupport toneRose
class node_developer,node_unityapp,node_xrproviders toneIndigo
```

## Components

### Framework Configuration

- [MRTK framework](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK): `Assets/MRTK`
- [Toolkit profiles](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/Definitions): `Assets/MRTK/Core/Definitions`
- [Service configuration](https://github.com/microsoft/mixedrealitytoolkit-unity/blob/main/Assets/MRTK/Core/Definitions/MixedRealityServiceConfiguration.cs): `Assets/MRTK/Core/Definitions/MixedRealityServiceConfiguration.cs`

### Input and Tracking

- [Input system](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/Definitions/InputSystem): `Assets/MRTK/Core/Definitions/InputSystem`
- [Device definitions](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/Definitions/Devices): `Assets/MRTK/Core/Definitions/Devices`
- [Input events](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/EventDatum/Input): `Assets/MRTK/Core/EventDatum/Input`
- [Hand tracking](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/Definitions/SpatialAwareness): `Assets/MRTK/Core/Definitions/SpatialAwareness`

### Spatial Experience

- [Spatial awareness](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/Definitions/SpatialAwareness): `Assets/MRTK/Core/Definitions/SpatialAwareness`
- [Boundary system](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/Definitions/BoundarySystem): `Assets/MRTK/Core/Definitions/BoundarySystem`
- [Spatial queries](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK/Core/Definitions/Physics): `Assets/MRTK/Core/Definitions/Physics`
- [Spatial UI building blocks](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK): `Assets/MRTK`

### Platform Integration

- [Editor simulation](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/MRTK): `Assets/MRTK`
- [Device support](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/main/Assets/XR): `Assets/XR`

### Other components

- **Unity developer**
- **Unity app**
- **XR providers**

## Connections

- Unity developer → Unity app: develops in (evidence: `README.md`)
- Unity developer → MRTK framework: uses (evidence: `README.md`)
- MRTK framework → Toolkit profiles: configurable through
- Toolkit profiles → Service configuration: configures services
- XR providers → Device definitions: provides device input
- MRTK framework → Input system: provides input (evidence: `README.md`)
- Input system → Input events: dispatches events
- Input system → Device definitions: supports devices
- MRTK framework → Hand tracking: supports hand tracking (evidence: `README.md`)
- MRTK framework → Spatial awareness: provides spatial interaction (evidence: `README.md`)
- Spatial awareness → Boundary system: supports boundaries
- Spatial awareness → Spatial queries: supports spatial queries
- MRTK framework → Spatial UI building blocks: provides UI building blocks (evidence: `README.md`)
- Unity developer → Editor simulation: prototypes with (evidence: `README.md`)
- MRTK framework → Device support: supports XR platforms (evidence: `README.md`)
- Unity app → MRTK framework: integrates
