🔧 Tools Directory 📰 Blog 👁️ Invisible AI 🧠 Micro-Habits
← Back to Prompt Library
🥽 Prompt Library

XR & Unity Prompts

Specialised AI prompts for VR/AR/MR development, Unity scripting, and immersive technology — 20 ready-to-use prompts, copy with one click.

How AI Is Accelerating XR and Unity Development in 2026

Extended Reality development has always required a uniquely broad skillset — 3D mathematics, spatial audio, performance optimisation for mobile GPUs, platform-specific SDKs, and interaction design for environments where the user has no mouse or keyboard. AI tools are now accelerating every one of these areas. As a Senior XR Developer with 13+ years building VR, AR, and MR experiences across Meta Quest, HoloLens, ARKit, and ARCore, I have integrated AI coding assistants deeply into my development workflow.

These 20 prompts are built specifically for XR and Unity development scenarios — not general coding questions. They cover Unity C# scripting patterns for XR Interaction Toolkit 2.5+, Meta Quest optimisation for 72Hz frame rate targets, AR Foundation setup for cross-platform deployment, spatial audio implementation, shader debugging in URP, and performance profiling for mobile VR. These are the prompts I actually use when building XR experiences.

Whether you are building your first VR prototype or shipping a commercial AR application, these prompts will help you debug platform-specific issues faster, write cleaner XR interaction code, and avoid the performance pitfalls that kill frame rate on mobile VR headsets.

How to Use These Prompts Effectively

1

Specify platform and SDK version first

Add your target platform (Quest 3, ARKit, ARCore, HoloLens) and Unity version before using any prompt. This context transforms output quality.

2

Paste your existing code

For debugging and optimisation, always include your current implementation. AI fixes real code better than generating from scratch.

3

Use ChatGPT for complex XR architecture

ChatGPT handles multi-system XR architecture and long code context well. Use it for design pattern questions and SDK integration planning.

4

Test in Editor before building to device

Run AI-generated XR code with XR Device Simulator in Unity Editor first. Catch errors before the longer device build cycle.

💡 Pro Tips

  • Always specify your target platform and Unity version. Meta Quest 3, HoloLens 2, ARKit, and ARCore have completely different performance budgets and SDK requirements. Unity 2022 LTS and Unity 6 have meaningful API differences.
  • Use ChatGPT for architecture questions. ChatGPT handles complex multi-system XR architecture questions better — it can hold the context of your full scene hierarchy while answering specific implementation questions.
  • Paste your actual code for debugging. For shader errors and XR interaction bugs, always include your current implementation. AI fixes real code far better than generating from scratch.
  • Chain architecture and implementation prompts. Start with the system architecture prompt to plan your scene structure, then use individual implementation prompts for each component. This keeps your codebase consistent.
👤

Curated by Prabhu Kumar Dasari

Senior XR Developer · AI Architect · 13+ years experience · 13+ years building XR experiences on Meta Quest, HoloLens, ARKit, ARCore, and Vuforia

🔍
All XR & Unity Prompts
20 prompts
Unity XR Interaction Script
Intermediate
📌 VR development
Write a Unity C# script using the XR Interaction Toolkit for [interaction type: grab/hover/select/socket]. Requirements: [list requirements]. Use: XRGrabInteractable or appropriate base class, proper event handling (OnSelectEntered/OnSelectExited/OnHoverEntered), haptic feedback on interaction, visual feedback (highlight/outline), and compatibility with Meta Quest and PC VR.
🤖 Example tool: 🎮 ChatGPT
Grabbable object system for a VR surgical training simulation on Meta Quest 3 — needed haptic feedback and physical constraints.
📄 ChatGPT Output
ChatGPT XR Interaction Script (excerpt)
Context provided: Meta Quest 3, Unity 2022.3 LTS, XR Interaction Toolkit 2.5.4, URP

public class SurgicalInstrumentInteractable : XRGrabInteractable { [SerializeField] private float hapticAmplitude = 0.3f; [SerializeField] private float hapticDuration = 0.1f; [SerializeField] private float maxGrabDistance = 0.5f; protected override void OnSelectEntered(SelectEnterEventArgs args) { base.OnSelectEntered(args); TriggerHaptic(hapticAmplitude, hapticDuration); }

ChatGPT note: "For Quest 3, haptic amplitude above 0.6 causes noticeable controller heat after 15+ minutes. For surgical training sessions running 30-45 minutes, keep amplitude at 0.2-0.4. Also added: automatic release when object exceeds maxGrabDistance — prevents the rubber band effect where grabbed objects stretch across the room if physics layer conflicts."
VR Locomotion System
Intermediate
📌 VR development
Design and implement a VR locomotion system in Unity with the following options: [teleportation/continuous movement/snap turning/smooth turning]. Include: comfort vignette for motion sickness reduction, configurable movement speed, obstacle detection, height calibration for different users, and input mapping for [Meta Quest/PC VR/Cross-platform].
AR Foundation Plane Detection
Intermediate
📌 AR development
Write Unity C# code using AR Foundation for [ARCore/ARKit/multi-platform] that: detects horizontal and vertical planes, visualises detected planes with a custom material, allows the user to place [object type] on detected planes, handles plane updates and removal, and includes proper AR session management.
🤖 Example tool: 📱 ChatGPT
AR Foundation setup for a retail app — furniture placement on floors with wall detection for a home decor e-commerce client.
📄 ChatGPT Output
ChatGPT AR Foundation Setup (excerpt)
Stack: Unity 2022.3 LTS, AR Foundation 5.1, ARKit (iOS 16+), ARCore (Android 12+)

void Start() { _planeManager.requestedDetectionMode = PlaneDetectionMode.Horizontal | PlaneDetectionMode.Vertical; _planeManager.planesChanged += OnPlanesChanged; } private void OnPlanesChanged(ARPlanesChangedEventArgs args) { foreach (var plane in args.added) { // Only show placement indicator on horizontal planes plane.gameObject.SetActive( plane.alignment == PlaneAlignment.HorizontalUp); }

ChatGPT warning: "AR Foundation 5.x changed PlaneAlignment enum values from 4.x — tutorials written before 2023 use old values which compile but behave incorrectly on ARCore. Also: ARKit plane detection on iPhone 12 and older is significantly less accurate than iPhone 14+ and all iPhone 15 models due to LiDAR. Add a scanning required onboarding step for non-LiDAR devices."
VR UI Canvas Setup
Intermediate
📌 VR UI development
Create a world-space VR UI system in Unity with: canvas positioned correctly in 3D space, XR interaction toolkit-compatible buttons and sliders, proper event system configuration for VR, gaze-based interaction option, hand ray interaction, readable font sizes for VR headsets, and performance-optimised rendering.
Multiplayer VR Setup
Advanced
📌 Multiplayer VR
Set up Photon Unity Networking (PUN) for a multiplayer VR experience. Include: network manager setup, player avatar synchronisation (position, rotation, hand positions), voice chat integration with Photon Voice, room creation and joining UI, network-synchronised interactions, and latency handling for smooth XR experience.
XR Performance Optimiser
Advanced
📌 XR optimisation
Review this Unity XR scene for [Meta Quest standalone / PC VR] and identify performance issues. Check: draw call count, polygon budget compliance, texture memory usage, shader complexity, occlusion culling setup, LOD configuration, fixed foveated rendering setup (for Quest), and physics optimisation. Target: [72/90/120]fps stable.
🤖 Example tool: ⚡ ChatGPT
VR architecture walkthrough app on Meta Quest 2 dropping to 45fps during exterior scenes — needed to hit 72Hz minimum.
📄 ChatGPT Output
ChatGPT Performance Diagnosis
Profiler data pasted: CPU: 18.2ms | GPU: 14.8ms | Draw calls: 847 | Triangles: 2.1M | SetPass calls: 312

Issue 1 — Draw calls (primary): 847 draw calls on Quest 2 (Snapdragon XR2) will always drop below 72fps. Target is under 200 for Quest 2. Your exterior scene likely has separate materials per building element.
Fix: Enable GPU Instancing on building materials. Group static geometry using Static Batching.

Issue 2 — Triangle count: 2.1M is 4x too high. Quest 2 comfortable budget is 500K triangles per frame. Your LOD system is not triggering at correct distances.
Fix: Set LOD0 at 15m, LOD1 at 40m, culled at 80m.

Issue 3 — SetPass calls: 312 indicates shader complexity. Replace Standard shader with URP/Lit on non-interactive architectural surfaces. Reduces GPU cost 30-40% on mobile GPUs.
Hand Tracking Implementation
Advanced
📌 Hand tracking
Implement hand tracking in Unity using the Meta XR SDK / OpenXR Hand Tracking extension. Include: hand joint pose access, pinch gesture detection (index-thumb pinch), custom gesture recognition framework, visual hand mesh rendering, fallback to controller input when hand tracking unavailable, and gesture event system.
🤖 Example tool: 🤚 ChatGPT
Hand tracking for a VR museum experience on Meta Quest 3 — natural hand gestures to trigger exhibit information panels.
📄 ChatGPT Output
ChatGPT Hand Tracking Output (excerpt)
Platform: Meta Quest 3, Unity 2022.3 LTS, Meta XR SDK 60.0, XR Hands 1.4

private bool IsPointingGesture(XRHand hand) { var indexTip = hand.GetJoint(XRHandJointID.IndexTip); var indexMCP = hand.GetJoint(XRHandJointID.IndexProximal); if (!indexTip.TryGetPose(out var tipPose)) return false; if (!indexMCP.TryGetPose(out var mcpPose)) return false; float indexExtension = Vector3.Distance( tipPose.position, mcpPose.position); return indexExtension > 0.08f; // 8cm = finger extended }

ChatGPT UX note: "For museum experiences, avoid pinch-to-select as primary gesture — users unfamiliar with VR consistently miss the activation threshold. Use dwell-based selection (hold pointing gesture 1.5 seconds) with radial progress indicator. Significantly more accessible for non-gaming audiences and reduces accidental activations by ~70% based on Meta's published UX research."
VR Training Module Builder
Advanced
📌 VR training
Design the architecture for a VR training module in Unity for [training topic]. Include: step-by-step task sequencing system, user action detection and validation, performance scoring algorithm, hint/guidance system triggered by errors, progress saving, final assessment with pass/fail criteria, and training record generation.
Spatial Audio Setup
Intermediate
📌 VR audio
Set up spatial 3D audio in Unity for a VR application. Include: Audio Source 3D configuration for realistic distance falloff, HRTF (Head-Related Transfer Function) setup, occlusion and obstruction effects, reverb zones for different environments, ambient sound system, interactive object sound triggers, and audio optimisation for standalone VR.
XR Scene Transition System
Intermediate
📌 VR scene management
Build a smooth scene/environment transition system for a VR application in Unity. Include: fade to black with configurable duration, loading screen with progress indicator, async scene loading, seamless transition without motion sickness, player position reset on scene load, and event callbacks for pre/post transition logic.
AR Image Tracking
Intermediate
📌 AR development
Implement AR image tracking in Unity using AR Foundation for [ARCore/ARKit]. Include: reference image library setup, tracking state management (tracking/limited/none), object placement on tracked image, handling multiple simultaneous tracked images, proper scaling relative to physical image size, and tracking lost/found event handling.
VR Physics Interactions
Advanced
📌 VR physics
Implement realistic physics-based interactions for VR in Unity. Include: configurable two-handed grabbing, throwing with realistic velocity, weight simulation through haptics, breakable/deformable objects, liquid simulation (simple), constraint systems for [valves/levers/buttons], and performance-optimised physics that stays within VR frame time budget.
MR Spatial Mesh Integration
Advanced
📌 Mixed Reality
Implement Mixed Reality spatial mesh processing in Unity for HoloLens 2 using MRTK. Include: mesh generation and visualisation, physics colliders from spatial mesh, occlusion of virtual objects by real world, mesh simplification for performance, room-scale awareness, and spatial anchors for persistent object placement.
VR Assessment System
Advanced
📌 VR training
Design a VR assessment and evaluation system in Unity for [skill/task]. Include: task completion detection with tolerance values, time tracking per step, error detection and categorisation, performance scoring algorithm (0-100%), real-time feedback system, post-assessment report generation, and data export for [LMS/database integration].
Convai NPC Integration
Advanced
📌 AI in XR
Integrate Convai AI into a Unity XR application for conversational NPC interactions. Include: Convai SDK setup, voice input capture and streaming, AI response audio playback with lip sync, character animation states (idle/talking/thinking), context-aware conversation with scene state, fallback responses, and conversation history management.
XR Onboarding Tutorial
Intermediate
📌 VR UX design
Design an in-VR onboarding tutorial system in Unity for new users. Include: controller/hand introduction sequence, progressive disclosure of features, contextual tooltips positioned in 3D space, task completion detection, skip option for experienced users, tutorial progress persistence, and accessibility options (text size, audio descriptions).
VR Data Visualisation
Advanced
📌 VR data viz
Create a 3D data visualisation system for VR in Unity. Display [data type: bar chart/scatter plot/network graph/timeline] in immersive 3D space. Include: data parsing from [JSON/CSV], interactive elements (grab to inspect, pinch to filter), animated transitions between data states, labels that always face the user, and scale controls.
Meta Quest Build Configuration
Intermediate
📌 Quest development
Provide the complete Unity build configuration checklist for Meta Quest [2/3/Pro] standalone deployment. Include: Android build settings, Quest-specific player settings, XR plugin management, graphics settings for URP optimised for Quest, stereo rendering mode selection, fixed foveated rendering, performance tier settings, and manifest configuration.
VR Object Interaction System
Intermediate
📌 VR interactions
Build a modular XR object interaction system in Unity that supports: hover highlighting with shader effect, grab with configurable attach points, throw with velocity tracking, inspect mode (freeze in front of user), contextual menu on hold, interaction events for external systems, and network synchronisation preparation.
HoloLens MRTK Setup
Advanced
📌 HoloLens development
Set up a HoloLens 2 Mixed Reality application in Unity using MRTK3. Include: MRTK configuration profile, hand tracking setup, eye tracking integration, voice commands registration, spatial awareness mesh setup, Near interaction (hand manipulation) and Far interaction (ray casting) configuration, and deployment to device.
Other Categories
✍️ Writing💻 Coding📣 Marketing🎨 Image Generation💼 Business📈 Stock Market & Finance💼 Resume & Jobs
Frequently Asked Questions

How is AI changing XR and Unity development workflows in 2026?

AI coding assistants are now embedded in professional XR development. Tools like ChatGPT and GitHub Copilot are used for Unity C# scripting, shader debugging, XR Interaction Toolkit configuration, and Meta Quest performance optimisation. The biggest gains are in debugging platform-specific issues that previously required hours of forum searching, and generating boilerplate for standard XR patterns like grab interactions, locomotion systems, and spatial audio setup.

Which AI model handles Unity and XR questions best?

ChatGPT handles complex XR and Unity architecture questions best — particularly multi-system design, performance analysis, and SDK integration planning. Its conversational format works well for iterative debugging. GitHub Copilot in Visual Studio or Rider is the most productive for active Unity scripting sessions. For quick Unity C# syntax references, Gemini is fast and reliable.

How do I optimise these prompts for Meta Quest development?

Always specify Quest 3 or Quest 2, include your current draw call count, triangle budget, and GPU frame time from Unity Profiler, and mention whether you are using Universal Render Pipeline. Quest 3 has approximately double the headroom of Quest 2 — targeting 72Hz on Quest 2 requires strict budgeting (under 200 draw calls, under 500K triangles). Adding your actual profiler numbers produces optimisation advice that is immediately actionable.

Can AI help with AR Foundation cross-platform development for iOS and Android?

Yes — AR Foundation prompts work well when you specify both target platforms, your Unity version, and the specific AR feature you are implementing. AR Foundation 5.x introduced API changes from 4.x that many tutorials and Stack Overflow answers predate — always mention your AR Foundation version. LiDAR-equipped iPhones have significantly better plane detection than non-LiDAR devices, which affects how you design your AR onboarding flow.

💬 Comments 0
Leave a comment
Loading comments…