dotnet-mixed-reality

Guides C# and .NET development for HoloLens, MRTK, OpenXR, and Azure mixed-reality solutions.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/zhenpengLai/myuseskill --skill dotnet-mixed-reality-zhenpenglai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dotnet-mixed-reality
Source: https://github.com/zhenpengLai/myuseskill/tree/main/dotnet-mixed-reality
Command: npx skills add https://github.com/zhenpengLai/myuseskill --skill dotnet-mixed-reality-zhenpenglai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Mixed-reality development with .NET is confusing because most Microsoft guidance is Unity-centered, toolkit versions change frequently, and it is easy to blur the boundary between device-side code and backend services. This Skill provides grounded architectural guidance and proven code patterns for building MR solutions with C#. ## Core Features & Use Cases - Architecture Guidance: Separates engine-side concerns, device capabilities, and backend service integration so system boundaries stay clear. - MRTK and OpenXR Patterns: Provides established patterns for service architecture, input action mapping, spatial awareness observers, feature plugins, dependency injection, object pooling, and graceful degradation. - HoloLens Scenario Examples: Includes working C# examples for spatial anchors, hand menus, spatial mapping physics, eye tracking, remote rendering, voice commands, QR code tracking, and shared multi-user experiences. - Use Case: When building a HoloLens app that places persistent holograms, use the Azure Spatial Anchors example to create, save, and relocate cloud anchors across sessions. ## Quick Start Ask the AI to help you implement a hand-attached MRTK menu or set up Azure Spatial Anchors for your HoloLens application.

Frequently Asked Questions about dotnet-mixed-reality

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create persistent holograms with Azure Spatial Anchors in Unity?▼

Create a CloudSpatialAnchorSession, attach a native WorldAnchor to your hologram, wait until the session reports IsReadyForCreate, then call CreateAnchorAsync. Store the returned anchor identifier and use an AnchorLocateCriteria watcher to relocate it in later sessions.

How do I implement hand tracking menus with MRTK?▼

Use the IMixedRealityHandJointService from CoreServices to request the palm joint transform each frame. Compare the palm normal against the direction to the user's head, and show or hide the menu when the angle crosses an activation threshold.

Should I use MRTK or OpenXR for HoloLens development?▼

MRTK provides higher-level services like input systems, spatial awareness, and hand menus, while OpenXR is the lower-level cross-platform runtime standard. Verify the current toolkit status before choosing, since Microsoft guidance and package support change over time.

Does eye tracking work on all HoloLens devices?▼

Eye tracking requires hardware support such as HoloLens 2 and must be enabled through the IMixedRealityEyeGazeProvider. Always implement a head-gaze fallback and check IsEyeTrackingEnabled before relying on eye gaze for interaction.

When should backend logic stay out of my mixed-reality client?▼

Keep backend work in ASP.NET Core, SignalR, or Azure services when it involves data persistence, multi-user synchronization, or heavy computation. The MR client should handle device input, spatial rendering, and local interaction, while services handle shared state and business logic.

Why does my HoloLens app work in the Unity editor but fail on device?▼

Editor-only success hides device constraints like frame rate limits, missing capabilities, and spatial mapping behavior. Validate on the actual HoloLens device or emulator, and treat performance, input, and spatial UX as core constraints rather than polish items.