Closed Liatian closed 3 years ago
I could not reproduce this on a Pixel 3 with the following:
using System;
using UnityEngine;
using UnityEngine.XR.ARFoundation;
[RequireComponent(typeof(ARCameraManager))]
public class GetCpuImage : MonoBehaviour
{
ARCameraManager m_CameraManager;
void Start()
{
m_CameraManager = GetComponent<ARCameraManager>();
m_CameraManager.frameReceived += OnFrameReceived;
}
void OnFrameReceived(ARCameraFrameEventArgs eventArgs)
{
if (m_CameraManager.TryAcquireLatestCpuImage(out var image))
{
using (image)
{
Debug.Log($"{Time.realtimeSinceStartup}: Got image: {image}");
}
}
else
{
Debug.Log($"{Time.realtimeSinceStartup} Could not acquire cpu image.");
}
}
}
It could be device specific. Have you reproduced this on any other Android devices?
We were able to reproduce this on older versions of ARCore (Google Play Services for AR) but not the latest (1.19). What version do you currently have installed? If you go to the Play Store and update to the latest version, does that fix the problem for you?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug If ArFaceManager is enabled, the ARCameraManager TryAcquireLatestCpuImage(out XRCpuImage image) function stops returning true after 3 seconds of running.
To Reproduce Steps to reproduce the behavior:
Expected behavior TryAcquireLatestCpuImage (out XRCpuImage image) returns true while the application is running
Actual behavior If ArFaceManager is enabled, TryAcquireLatestCpuImage (out XRCpuImage image) returns true only for the first 3 seconds, otherwise when ArFaceManager is disabled, the function always returns true
Tablet: