Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
LuffyYu's avatar
LuffyYu
Member
5 months ago
Solved

Unity Native Texture Not Working in Pass-through Mode

I have managed to replicate this repo to show native texture in VR mode.

However, when I switch it to pass-through mode, the texture is not showing.

I have dived into it a bit, and found that that's because of the conflict of the pipeline, which makes the native plugin not initialized.

I am aware of the recently released Unity-PassthroughCameraAPISamples, but what I was trying to do was showing texture that is not from the local camera.

I also knew WebCamTexture, but I wonder if it is possible to show texture not from the local camera.

Everything works well in VR mode, here is the log when switching to pass-through mode.

2025-07-23 16:42:12.288  2195-2218  BufferQueueProducer     com.oculus.vrshell                   E  [SurfaceTexture-115-2195-274](id:893000001ad,api:1,p:1137,c:2195) dequeueBuffer: BufferQueue has been abandoned
2025-07-23 16:42:12.288  1137-1137  CompositionEngine       surfaceflinger                       E  ANativeWindow::dequeueBuffer failed for display [com.oculus.android_panel_app.AndroidPanelLayer-com.oculus.systemux-mr_ed] with error: -19
2025-07-23 16:42:12.288  1137-1137  CompositionEngine       surfaceflinger                       W  Dequeuing buffer for display [com.oculus.android_panel_app.AndroidPanelLayer-com.oculus.systemux-mr_ed] failed, bailing out of client composition for this frame
2025-07-23 16:42:12.288  2195-20352 BufferQueueProducer     com.oculus.vrshell                   E  [SurfaceTexture-115-2195-274](id:893000001ad,api:1,p:1137,c:2195) dequeueBuffer: BufferQueue has been abandoned
2025-07-23 16:42:12.288  1137-1137  CompositionEngine       surfaceflinger                       E  ANativeWindow::dequeueBuffer failed for display [com.oculus.android_panel_app.AndroidPanelLayer-com.oculus.systemux-mr_ed] with error: -19
2025-07-23 16:42:12.288  1137-1137  CompositionEngine       surfaceflinger                       W  Dequeuing buffer for display [com.oculus.android_panel_app.AndroidPanelLayer-com.oculus.systemux-mr_ed] failed, bailing out of client composition for this frame
2025-07-23 16:42:12.295 21666-21798 BitrateCalculator       com...pany.NativeRenderTextureUnity  D  accumulate (0xb4000077dabf1690): 522 22365833810

Thanks,

  • Figure out by myself. It is because of the CommandBuffer. There is no skybox in MR mode. That's why it didn't work.

2 Replies

Replies have been turned off for this discussion
  • Figure out by myself. It is because of the CommandBuffer. There is no skybox in MR mode. That's why it didn't work.

  • Anonymous's avatar
    Anonymous

    Thanks for coming back to share your solution!