ARCoachingOverlay

Inherits: RefCounted < Object

A standard Apple onboarding overlay that guides users during AR session setup.

Description

Wraps ARCoachingOverlayView, which provides a system-standard UI that instructs users to move their device to initialize tracking. Attach to a session with attach_to_session() and configure the goal to match your AR experience. iOS only. On visionOS, the system provides its own spatial onboarding UX. On macOS, there is no equivalent. The type exists on all platforms for API consistency but is a no-op outside iOS.

Properties

bool

activates_automatically

true

int

goal

0

Methods

void

attach_to_session(session: ARSession)

void

set_active(active: bool, animated: bool)


Signals

coaching_did_deactivate() 🔗

Emitted when the coaching overlay finishes and dismisses itself.


Enumerations

enum Goal: 🔗

Goal TRACKING = 0

Guide the user until general tracking quality is sufficient.

Goal HORIZONTAL_PLANE = 1

Guide the user until a horizontal plane is found.

Goal VERTICAL_PLANE = 2

Guide the user until a vertical plane is found.

Goal ANY_PLANE = 3

Guide the user until any supported plane is found.

Goal GEO_TRACKING = 4

Guide the user until geo tracking becomes available.


Property Descriptions

bool activates_automatically = true 🔗

  • void set_activates_automatically(value: bool)

  • bool get_activates_automatically()

When enabled, the overlay appears automatically whenever the session needs coaching.


int goal = 0 🔗

  • void set_goal(value: int)

  • int get_goal()

The type of guidance the overlay should provide. See Goal.


Method Descriptions

void attach_to_session(session: ARSession) 🔗

Attaches the overlay to session so the system can present coaching UI for that session.


void set_active(active: bool, animated: bool) 🔗

Shows or hides the coaching overlay. When animated is true, the transition uses the system animation.