: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/ARWorldMap.xml. .. _class_ARWorldMap: ARWorldMap ========== **Inherits:** :ref:`RefCounted` **<** :ref:`Object` A serializable snapshot of the AR world state for session persistence. .. rst-class:: classref-introduction-group Description ----------- Captures the spatial mapping, anchors, and feature points of an AR session so it can be saved and restored later. Use :ref:`ARSession.get_current_world_map()` to capture and :ref:`ARSession.run_with_world_map()` to restore. **iOS only.** On visionOS, spatial anchors are persisted automatically by the system via WorldTrackingProvider. On macOS, world map persistence is not available through remote sessions. The type exists on all platforms for API consistency but serialize/deserialize are no-ops outside iOS. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-----------------------------------------+-------------------------------------------------------------------------+----------------------+ | :ref:`Array` | :ref:`anchors` | ``[]`` | +-----------------------------------------+-------------------------------------------------------------------------+----------------------+ | :ref:`Vector3` | :ref:`center` | ``Vector3(0, 0, 0)`` | +-----------------------------------------+-------------------------------------------------------------------------+----------------------+ | :ref:`Vector3` | :ref:`extent` | ``Vector3(0, 0, 0)`` | +-----------------------------------------+-------------------------------------------------------------------------+----------------------+ | :ref:`ARPointCloud` | :ref:`raw_feature_points` | ``null`` | +-----------------------------------------+-------------------------------------------------------------------------+----------------------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ARWorldMap` | :ref:`deserialize`\ (\ data\: :ref:`PackedByteArray`\ ) |static| | +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`serialize`\ (\ ) | +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ARWorldMap_property_anchors: .. rst-class:: classref-property :ref:`Array` **anchors** = ``[]`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_anchors**\ (\ value\: :ref:`Array`\ ) - :ref:`Array` **get_anchors**\ (\ ) Anchors stored in the world map. .. rst-class:: classref-item-separator ---- .. _class_ARWorldMap_property_center: .. rst-class:: classref-property :ref:`Vector3` **center** = ``Vector3(0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_center**\ (\ value\: :ref:`Vector3`\ ) - :ref:`Vector3` **get_center**\ (\ ) The center of the mapped region. .. rst-class:: classref-item-separator ---- .. _class_ARWorldMap_property_extent: .. rst-class:: classref-property :ref:`Vector3` **extent** = ``Vector3(0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_extent**\ (\ value\: :ref:`Vector3`\ ) - :ref:`Vector3` **get_extent**\ (\ ) The size of the mapped region. .. rst-class:: classref-item-separator ---- .. _class_ARWorldMap_property_raw_feature_points: .. rst-class:: classref-property :ref:`ARPointCloud` **raw_feature_points** = ``null`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_raw_feature_points**\ (\ value\: :ref:`ARPointCloud`\ ) - :ref:`ARPointCloud` **get_raw_feature_points**\ (\ ) The feature points captured in the world map, if available. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ARWorldMap_method_deserialize: .. rst-class:: classref-method :ref:`ARWorldMap` **deserialize**\ (\ data\: :ref:`PackedByteArray`\ ) |static| :ref:`🔗` Creates an **ARWorldMap** instance from previously serialized data. .. rst-class:: classref-item-separator ---- .. _class_ARWorldMap_method_serialize: .. rst-class:: classref-method :ref:`PackedByteArray` **serialize**\ (\ ) :ref:`🔗` Serializes the world map into a :ref:`PackedByteArray` for saving or network transfer. .. |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.)`