I've tried testing the c# code for a QR code reader in this answer here
I just copy pasted the code into a C# script and placed it in the ARCamera prefab just like how the KDelli said but I've been getting this error:
error CS0117: 'Image' does not contain a definition for 'PIXEL_FORMAT'
from these two lines:
private IEnumerator InitializeCamera() {
var isFrameFormatSet = CameraDevice.Instance.SetFrameFormat(Image.PIXEL_FORMAT.RGB888, true);
}
private void Update() {
var cameraFeed = CameraDevice.Instance.GetCameraImage(Image.PIXEL_FORMAT.RGB888);
}
I think I just missed something like a using
code/library or it might be due to the code being old that this error arise.
PIXEL_FORMAT
has been moved from Image
to just Vuforia
. So if you are importing Vuforia you can just use PIXEL_FORMAT.RGB888
instead of Image.PIXEL_FORMAT.RGB888
For more information, you can find the latest API here