ARWorldMap

Inherits: RefCounted < Object

A serializable snapshot of the AR world state for session persistence.

Description

Captures the spatial mapping, anchors, and feature points of an AR session so it can be saved and restored later. Use ARSession.get_current_world_map() to capture and 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.

Properties

Array

anchors

[]

Vector3

center

Vector3(0, 0, 0)

Vector3

extent

Vector3(0, 0, 0)

ARPointCloud

raw_feature_points

null

Methods

ARWorldMap

deserialize(data: PackedByteArray) static

PackedByteArray

serialize()


Property Descriptions

Array anchors = [] 🔗

  • void set_anchors(value: Array)

  • Array get_anchors()

Anchors stored in the world map.


Vector3 center = Vector3(0, 0, 0) 🔗

  • void set_center(value: Vector3)

  • Vector3 get_center()

The center of the mapped region.


Vector3 extent = Vector3(0, 0, 0) 🔗

  • void set_extent(value: Vector3)

  • Vector3 get_extent()

The size of the mapped region.


ARPointCloud raw_feature_points = null 🔗

The feature points captured in the world map, if available.


Method Descriptions

ARWorldMap deserialize(data: PackedByteArray) static 🔗

Creates an ARWorldMap instance from previously serialized data.


PackedByteArray serialize() 🔗

Serializes the world map into a PackedByteArray for saving or network transfer.