:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/../../GodotApplePlugins/doc_classes/ARCoachingOverlay.xml. .. _class_ARCoachingOverlay: ARCoachingOverlay ================= **Inherits:** :ref:`RefCounted` **<** :ref:`Object` A standard Apple onboarding overlay that guides users during AR session setup. .. rst-class:: classref-introduction-group Description ----------- Wraps ARCoachingOverlayView, which provides a system-standard UI that instructs users to move their device to initialize tracking. Attach to a session with :ref:`attach_to_session()` and configure the :ref:`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. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-------------------------+------------------------------------------------------------------------------------------+----------+ | :ref:`bool` | :ref:`activates_automatically` | ``true`` | +-------------------------+------------------------------------------------------------------------------------------+----------+ | :ref:`int` | :ref:`goal` | ``0`` | +-------------------------+------------------------------------------------------------------------------------------+----------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +--------+------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`attach_to_session`\ (\ session\: :ref:`ARSession`\ ) | +--------+------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_active`\ (\ active\: :ref:`bool`, animated\: :ref:`bool`\ ) | +--------+------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Signals ------- .. _class_ARCoachingOverlay_signal_coaching_did_deactivate: .. rst-class:: classref-signal **coaching_did_deactivate**\ (\ ) :ref:`🔗` Emitted when the coaching overlay finishes and dismisses itself. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_ARCoachingOverlay_Goal: .. rst-class:: classref-enumeration enum **Goal**: :ref:`🔗` .. _class_ARCoachingOverlay_constant_TRACKING: .. rst-class:: classref-enumeration-constant :ref:`Goal` **TRACKING** = ``0`` Guide the user until general tracking quality is sufficient. .. _class_ARCoachingOverlay_constant_HORIZONTAL_PLANE: .. rst-class:: classref-enumeration-constant :ref:`Goal` **HORIZONTAL_PLANE** = ``1`` Guide the user until a horizontal plane is found. .. _class_ARCoachingOverlay_constant_VERTICAL_PLANE: .. rst-class:: classref-enumeration-constant :ref:`Goal` **VERTICAL_PLANE** = ``2`` Guide the user until a vertical plane is found. .. _class_ARCoachingOverlay_constant_ANY_PLANE: .. rst-class:: classref-enumeration-constant :ref:`Goal` **ANY_PLANE** = ``3`` Guide the user until any supported plane is found. .. _class_ARCoachingOverlay_constant_GEO_TRACKING: .. rst-class:: classref-enumeration-constant :ref:`Goal` **GEO_TRACKING** = ``4`` Guide the user until geo tracking becomes available. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ARCoachingOverlay_property_activates_automatically: .. rst-class:: classref-property :ref:`bool` **activates_automatically** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_activates_automatically**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_activates_automatically**\ (\ ) When enabled, the overlay appears automatically whenever the session needs coaching. .. rst-class:: classref-item-separator ---- .. _class_ARCoachingOverlay_property_goal: .. rst-class:: classref-property :ref:`int` **goal** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_goal**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_goal**\ (\ ) The type of guidance the overlay should provide. See :ref:`Goal`. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ARCoachingOverlay_method_attach_to_session: .. rst-class:: classref-method |void| **attach_to_session**\ (\ session\: :ref:`ARSession`\ ) :ref:`🔗` Attaches the overlay to ``session`` so the system can present coaching UI for that session. .. rst-class:: classref-item-separator ---- .. _class_ARCoachingOverlay_method_set_active: .. rst-class:: classref-method |void| **set_active**\ (\ active\: :ref:`bool`, animated\: :ref:`bool`\ ) :ref:`🔗` Shows or hides the coaching overlay. When ``animated`` is ``true``, the transition uses the system animation. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`