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 |
|
|
Vector3 |
|
|
Vector3 |
|
|
|
Methods¶
deserialize(data: PackedByteArray) static |
|
PackedByteArray |
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 🔗
void set_raw_feature_points(value: ARPointCloud)
ARPointCloud get_raw_feature_points()
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.