Access CPU Image within Simulation

I want to access the CPU Image, as it is done in the AR Foundations CPUImageSmaple.cs. If the app is deployed to the smartphone everything works as intended and i see the CPU image on a RawImage. However, in play mode the RawImage stays white. OnCameraFrameReceived() is not called. It seems as if the m_CameraManager.frameReceived event is never fired.

m_CameraManager = MarsRuntimeUtils.GetActiveCamera(true).GetComponent<ARCameraManager>();did not resolve the issue.

My setup: Unity 2019.4.3f1, AR Foundation 4.1.0 preview 7, Unity MARS 1.2.0

Thank you in advance!

Hi there!

We do not currently simulate camera image, but we are working on adding this feature to a future update. I’ll update this thread when that is available. Stay tuned!

1 Like

This still seems to be the case in newer versions. Is there any plan on adding this in the future?

@MajorWolph - The support for XRCpuImage was added to the XR Simulation in AR Foundation in 5.1.0-pre.3
https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@5.1/changelog/CHANGELOG.html#added-1