
Case study
TeslaKit: Unity/C# API Toolkit for XR Prototyping
Designed and built an open-source Unity/C# toolkit connecting vehicle APIs to interactive prototypes, with typed async requests, extensible endpoints, a developer dashboard, and a NextMind input example.
Creator · API design, Unity development, and interaction prototyping · Independent R&D
I designed and built TeslaKit, an open-source Unity/C# package for connecting vehicle APIs to interactive applications. The work combined a reusable integration layer with example interfaces that made it possible to explore different ways of interacting with a connected vehicle.
- Ownership: Package architecture, C# API integration, developer-facing UI, and experimental input prototypes.
- Technical scope: Typed asynchronous requests, vehicle state models, endpoint extensions, and Unity sample scenes.
- Delivery: An open-source package with a dashboard/debug interface and a NextMind input example, alongside broader AR prototyping work.
Explore the source on GitHub ↗
The Challenge
A connected-vehicle prototype needs more than a compelling interaction. It must translate application intent into API requests, turn responses into useful interface state, and make that behavior understandable during development.
I wanted to make that integration reusable across Unity experiences. A developer experimenting with a new interface should be able to work with vehicle data and endpoint methods without rebuilding the request and response layer for every scene.
Engineering insight: Separating the input experience from the vehicle API made the integration reusable. The dashboard and experimental input could exercise the same underlying C# layer.
Building the Reusable Layer
TeslaKit organized vehicle access around a client, vehicle objects, and typed response models. Asynchronous methods returned tasks that application code could await, keeping request handling separate from the presentation of results.
I also exposed a generic request method and C# extension points. Adding an endpoint meant defining its request and response shape while reusing the existing vehicle abstraction.
A simplified view of the reusable integration layer and the interfaces built around it.
| Decision | Purpose |
|---|---|
| Typed response models and async methods | Let application code await a request and work with named state fields. |
| A shared client and vehicle abstraction | Keep API integration separate from individual Unity scenes. |
| Endpoint extension methods | Add capabilities without duplicating the core request path. |
| A dashboard alongside the package | Make requests, responses, and interface behavior visible during prototyping. |
Making the Integration Observable
I built a dashboard/debug interface with selectable requests, response output, and vehicle-state displays. It served as both a sample application and a way to inspect the connection between an API response and the UI consuming it.

The dashboard made the integration tangible: developers could select operations and inspect returned state inside Unity.
The response-handling example below shows the package's typed async pattern. It receives an existing state-request task and reads the returned heading; authentication and request initiation are outside this excerpt.
using System.Threading.Tasks; using Tesla.API.Core; public static class VehicleStateDisplay { public static async Task<string> HeadingLabelAsync( Task<DriveState> stateRequest) { DriveState state = await stateRequest; return $"Heading: {state.Response.heading}°"; } }
Exploring Alternative Inputs
The NextMind example connected headset calibration and visual-target trigger events to the existing application interface. It explored whether a different input method could reuse the same integration, rather than requiring its own vehicle-access implementation.

An experimental NextMind interaction using calibrated visual targets.
The broader project also explored vehicle interfaces using AR Foundation. The public package includes desktop dashboard and NextMind samples, providing concrete examples of the integration in use.
What the Work Delivered
TeslaKit demonstrates my approach to developer tools: build a reusable API layer, make its behavior visible, and exercise it through working interactions. This was independent R&D, released as a historical open-source project against the vehicle API available at the time.