How to Access Camera Data to Scan QR code in Quest 3?

Hey, I need a way to access the camera data on Quest to scan a QR code. Is that currently possible? I read about the new Camera API, but it seems to only work with Unity. I had an idea to write something in native code and pass it to C++, but I’m not sure if that would work.

1 Like

you liked my previous comment about camera access.

As you know, Meta changed their behavior for Quest 3 couple months ago (I think January 2025) When I wrote it there was no way to access them.

Currently, there is no blueprint or C++ way to do it, yet.

Because Epic doesn’t do device specific advance feature implementations and Meta likes Unity more than Unreal. So, you have to wait Meta about integrating it to their custom branch.

https://github.com/Oculus-VR/UnrealEngine

If you need immediately, you have to use JNI. You will first access camera buffer with camera2 API on Java, pass it as jbytearray to C++, convert it to uint8* or char*.

you can look at JNI usage from my plugin.

Also look at android.xml and build.cs files.

3 Likes

Thank you so much! That’s exactly what I thought — native code it is, then.

2 Likes

Look at FRunnabeThread. You need it because you won’t want to use game thread to access buffer. After getting buffer to UE, you can use ENQUEU RENDER COMMANDS to create texture. Do that QR processing in FRunnabeThread.

OpenCV doesn’t work on Android in UE5. So, you have to use Nayuki QR. But its Github version can’t build android that can work with UE. There is one marketplace plugin. Use its third party library in your plugin and add decoder to FRunnabeThread. You don’t need texture creation for processing. With this, you won’t do extra buffer extraction.

After process, you can create a texture with same processed buffer.

My plugin have all of these implementations.

2 Likes

Do you know if this method might also work for Pico 4 Ultra / PICOForOpenXR UE5.6 Plugin?

VR side are all the same for all devices but I don’t know anything about Pico’s advance XR side or its plugin capabilities.

I only have a rumor like they allow to access camera buffer with Enterprise license.

Even if it’s true, I don’t know if they exposed it to UE5 blueprint or it is a coding class and which languages supported.

If they don’t expose anything to blueprint and just camera2 API, you can use same workflow with Meta Quest 3. If they have a unique way, look at their forum or documentations.

Unreal’s unofficial Meta camera access plugin is this.

It is good for MVP but I don’t suggest it for production because everything works on game thread. It will affect performance.

Yes, it’s possible, and I did it using my Android Camera2 plugin. Check out this repository for Quest3 on QR code detection with the Passthrough Camera.