Check if ARKitCoachingOverlay is active

I am using ARKit’s ARKitCoachingOverlay with coachingActivatesAutomatically enabled. I’d like to enable the Point Cloud visualizer when the coaching overlay becomes active, and disable the point cloud visualizer again when the coaching overlay disappears. How can I check if the coaching overlay is active? In the older version 2.2.0 of AR Foundation there was a getter called coachingActive, but that doesn’t exist anymore since version 3.0.0.

Does anybody have an idea how I can achive this?

I am using the AR Foundation package version 3.0.1 on the Mac platform.

Thanks,
Marco

The ARKitSessionSubsystem.coachingActive boolean property exists in 3.0.1.

https://docs.unity3d.com/Packages/com.unity.xr.arkit@latest?subfolder=/api/UnityEngine.XR.ARKit.ARKitSessionSubsystem.html#UnityEngine_XR_ARKit_ARKitSessionSubsystem_coachingActive

2 Likes

You’re right. I have overlooked this somehow. I guess I tried to get this property on the ARSession instance, instead of its subsystem.

Thanks!

1 Like