You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Composite View Recording and Screenshot Capture in Apple Vision Pro #16
Fantastic repo and meaningful tool for XR developers!
I wonder if this plugin will be able to capture the composite view inside Apple Vision Pro?
Based on my understanding, the current Main Camera Access will only capture the physical world view without a digital element.
But since I want to work on AR, I need to capture both the physical real-world environment and all the digital virtual elements overlaid on it.
For example, if you use system-level screen recoding, you will get the composite views.
Or if you know any programmatic way in Unity or Xcode we will be able to send a command, and trigger the start of composite view screenshot capture?
Apple has added a new API called “Passthrough in screen capture – Access a composite feed of what an Apple Vision Pro wearer is seeing (physical world and digital content).”
From the documentation, it looks like this API should allow exactly what you’re asking for: capturing the composite view that includes both the real-world passthrough and the overlaid virtual content.
However, this functionality requires a specific entitlement. I don’t have that entitlement yet, so I’ve submitted a request to Apple to get it added to my account.
Once Apple grants the entitlement, I’ll test the API.
Yes, I know the entitlement “Passthrough in screen capture – Access a composite feed of what an Apple Vision Pro wearer is seeing (physical world and digital content).”. It is one of the entitlements you will get if you have Enterprise API for Apple Vision Pro development.
But I am not sure from the code, how we use this entitlement.
Based on my research, maybe ReplayKit is something we need.
But I have never found a sample code for VisionOS, and not sure how to do it to actually get the screenshot or screen recording of the view.
Thank you for checking that out!
I currently found a workaround to fulfill my need and be able to get the composite view. AppleVisionPro_CompositeView_Capture
It does not require Enterprise API / Xcode / SwiftUI, I recommend checking about it and hope it helps!
Actually, this plugin is not purely written in C# code. I made a bridge swift code to transfer frame data to Unity. I will need to write similar code to make the composite video capture feature in Unity.
I've completed analyzing the current implementation and created a comprehensive plan for adding composite view capture functionality to capture both the physical world passthrough and digital content on Apple Vision Pro.
Current Architecture Analysis
Existing Camera Access (CameraAccess.swift:102-124, EnterpriseCameraAccessManager.cs)
Uses ARKitSession + CameraFrameProvider for physical camera access only
Captures .main camera with .left position
Pipeline: CVPixelBuffer → Metal Texture → Unity Texture2D
Current entitlement: com.apple.developer.arkit.main-camera-access.allow
Swift bridge via P/Invoke: startCapture(), stopCapture(), getTexture()
2. Swift Implementation - New Composite Capture Module
Approach: ReplayKit-based Screen Recording
Based on the issue discussion and @Carton22's mention of ReplayKit, the implementation should use:
File: CompositeViewCapture.swift (new)
import ReplayKit
import ARKit
import AVFoundation
// Key APIs to use:
// - RPScreenRecorder.shared() for composite capture
// - RPScreenRecorder.isCameraEnabled property
// - startCapture(handler:completionHandler:) for frame-by-frame access
// - Or startRecording() for video file recording
Two implementation modes needed:
A. Screenshot Mode (single frame capture)
Use RPScreenRecorder.shared().startCapture() to get composite frames
Extract single frame and convert to texture
Follow existing pattern: composite frame → Metal texture → Unity
B. Recording Mode (continuous capture)
Use RPScreenRecorder.shared().startRecording()
Save to file or stream frames continuously
Similar to current continuous camera feed pattern
3. Unity C# Bridge Extension
File: EnterpriseCameraAccessManager.cs
Add new methods and properties:
// New public APIpublicenumCaptureMode{PhysicalOnly,Composite}publicCaptureModeCurrentMode;publicvoidStartCompositeCapture();publicvoidStopCompositeCapture();publicvoidTakeCompositeScreenshot();publicTexture2DGetCompositeTexture2D();// New P/Invoke declarations[DllImport("__Internal")]staticexternvoidstartCompositeCapture();[DllImport("__Internal")]staticexternvoidstopCompositeCapture();[DllImport("__Internal")]staticexternIntPtrgetCompositeTexture();[DllImport("__Internal")]staticexternvoidcaptureCompositeScreenshot();
4. File Structure
New files to create:
CameraAccess.swift → Keep existing (physical camera only)
CompositeViewCapture.swift → New (composite capture via ReplayKit)
Keep separation for maintainability and backward compatibility
Modified files:
EnterpriseCameraAccessManager.cs → Add composite capture support
Preferred capture mode: Single screenshots, continuous recording, or both?
=>
Continuous recording
Performance requirements: Real-time capture needed or on-demand screenshots acceptable?
=>
Real time capture is needed
Audio: Should composite recordings include audio?
=>
No.
File output: Save to device storage or keep textures in memory only?
=>
Just implement the feature to update textures which is similar to the current camera access feature.
Activity
from2001 commentedon Jan 17, 2026
Hi @Carton22
Apple has added a new API called “Passthrough in screen capture – Access a composite feed of what an Apple Vision Pro wearer is seeing (physical world and digital content).”
From the documentation, it looks like this API should allow exactly what you’re asking for: capturing the composite view that includes both the real-world passthrough and the overlaid virtual content.
However, this functionality requires a specific entitlement. I don’t have that entitlement yet, so I’ve submitted a request to Apple to get it added to my account.
Once Apple grants the entitlement, I’ll test the API.
Carton22 commentedon Jan 17, 2026
Thanks @from2001 !
Yes, I know the entitlement “Passthrough in screen capture – Access a composite feed of what an Apple Vision Pro wearer is seeing (physical world and digital content).”. It is one of the entitlements you will get if you have Enterprise API for Apple Vision Pro development.
But I am not sure from the code, how we use this entitlement.
Based on my research, maybe
ReplayKitis something we need.But I have never found a sample code for VisionOS, and not sure how to do it to actually get the screenshot or screen recording of the view.
Thank you for checking that out!
Carton22 commentedon Jan 17, 2026
I currently found a workaround to fulfill my need and be able to get the composite view.
AppleVisionPro_CompositeView_Capture
It does not require Enterprise API / Xcode / SwiftUI, I recommend checking about it and hope it helps!
from2001 commentedon Jan 18, 2026
Actually, this plugin is not purely written in C# code. I made a bridge swift code to transfer frame data to Unity. I will need to write similar code to make the composite video capture feature in Unity.
I'll take a look, anyway.
Carton22 commentedon Jan 18, 2026
sounds good! Hope to get the composite video capture feature in your plugin soon!
Thanks for the hard work!
from2001 commentedon Jan 30, 2026
@Carton22 I finally got the enterprise license for the composite view. I will take a look.
from2001 commentedon Jan 30, 2026
@claude Plan to implement the feature to take images of what you see with your Vision Pro including contents and pass through view.
claude commentedon Jan 30, 2026
Claude finished @from2001's task in 2m 38s —— View job
Composite View Capture Implementation Plan ✓
I've completed analyzing the current implementation and created a comprehensive plan for adding composite view capture functionality to capture both the physical world passthrough and digital content on Apple Vision Pro.
Current Architecture Analysis
Existing Camera Access (
CameraAccess.swift:102-124,EnterpriseCameraAccessManager.cs)ARKitSession+CameraFrameProviderfor physical camera access only.maincamera with.leftpositionCVPixelBuffer→ Metal Texture → UnityTexture2Dcom.apple.developer.arkit.main-camera-access.allowstartCapture(),stopCapture(),getTexture()Implementation Plan
1. Entitlement Configuration
Required entitlement:
Action items:
Entitlements.entitlementsConfigureXcodeSettings.csto handle composite capture mode selection2. Swift Implementation - New Composite Capture Module
Approach: ReplayKit-based Screen Recording
Based on the issue discussion and @Carton22's mention of ReplayKit, the implementation should use:
File:
CompositeViewCapture.swift(new)Two implementation modes needed:
A. Screenshot Mode (single frame capture)
RPScreenRecorder.shared().startCapture()to get composite framesB. Recording Mode (continuous capture)
RPScreenRecorder.shared().startRecording()3. Unity C# Bridge Extension
File:
EnterpriseCameraAccessManager.csAdd new methods and properties:
4. File Structure
New files to create:
CameraAccess.swift→ Keep existing (physical camera only)CompositeViewCapture.swift→ New (composite capture via ReplayKit)Modified files:
EnterpriseCameraAccessManager.cs→ Add composite capture supportEntitlements.entitlements→ Add composite entitlementConfigureXcodeSettings.cs→ Update Info.plist for recording permissions5. Required Info.plist Keys
Add to
ConfigureXcodeSettings.cs:36:6. Testing Approach
Test scenarios:
7. Implementation Phases
Phase 1: Foundation
Entitlements.entitlementsCompositeViewCapture.swiftwith basic ReplayKit setupConfigureXcodeSettings.csPhase 2: C# Integration
EnterpriseCameraAccessManager.cswith composite APIsPhase 3: Testing & Polish
Key Technical Considerations
ReplayKit vs Direct Screen Capture
RPScreenRecorder): Apple's official API for screen recording with system UINSMicrophoneUsageDescriptioneven for video-onlyAlternative Approach: ScreenCaptureKit
If ReplayKit performance is insufficient:
ScreenCaptureKitframework (newer, more performant)Workaround Analysis (@Carton22's Solution)
The linked workaround repository uses Unity's built-in screen capture without requiring Enterprise API:
ScreenCapture.CaptureScreenshot()or similarNext Steps
CompositeViewCapture.swiftusing ReplayKitQuestions for @from2001
Let me know if you'd like me to proceed with the implementation or if you have any questions about the approach!
from2001 commentedon Jan 30, 2026
@claude
Implement the feature.
Answers of your questions are bellow.
Preferred capture mode: Single screenshots, continuous recording, or both?
=>
Continuous recording
Performance requirements: Real-time capture needed or on-demand screenshots acceptable?
=>
Real time capture is needed
Audio: Should composite recordings include audio?
=>
No.
File output: Save to device storage or keep textures in memory only?
=>
Just implement the feature to update textures which is similar to the current camera access feature.
claude commentedon Jan 30, 2026
Claude finished @from2001's task in 4m 11s —— View job •
claude/issue-16-20260130-1628• Create PR ➔Composite View Capture Implementation Complete ✓
I've successfully implemented continuous real-time composite view capture for Apple Vision Pro based on your requirements:
Implementation Summary
Added Files:
CompositeViewCapture.swift: ReplayKit-based continuous composite captureRPScreenRecorderfor real-time composite frame capturestartCompositeCapture(),stopCompositeCapture(),getCompositeTexture()Modified Files:
Entitlements.entitlements: Addedcom.apple.developer.screen-capture.composite-passthroughentitlementEnterpriseCameraAccessManager.cs:UseCompositeCapturepublic bool toggle (Inspector-accessible)TryGetCompositeTexture(),UpdateCompositeTexture()GetCompositeTexture2D()to access composite textureUseCompositeCaptureflag to route to correct capture modeConfigureXcodeSettings.cs: AddedNSPhotoLibraryUsageDescriptionInfo.plist key for screen capture permissionUsage
In Unity Editor:
EnterpriseCameraAccessManagerGameObjectUse Composite CapturecheckboxEnterpriseCameraAccessManager.Instance.GetCompositeTexture2D()Technical Details:
Next Steps
Please test on Vision Pro with enterprise license and verify:
PreviewMaterial--- | Branch
Add composite view capture support for Apple Vision Pro