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
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.
Paste your existing code
For debugging and optimisation, always include your current implementation. AI fixes real code better than generating from scratch.
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.
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
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."
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."
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.
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."