Skip to main content
←API Reference ←com.nianticspatial.nsdk.mesh

MeshDownloaderSession

↳ extends SessionBase

Declaration​

class MeshDownloaderSession

Summary​

Creates a Mesh Downloader instance. The Mesh Downloader allows you to retrieve mesh geometry and textures for VPS locations.


Properties​

NameTypeSummary
CHUNK_POLLING_DELAY_MSCHUNK_POLLING_DELAY_MS
-
DEFAULT_MAX_DECODED_SIZE_KBDEFAULT_MAX_DECODED_SIZE_KB
Default maxDecodedSizeKb of [downloadByAsset], sized for phones.
POLLING_DELAY_MSPOLLING_DELAY_MS
-
TIMEOUT_MSTIMEOUT_MS
-

Functions​

NameTypeSummary
configurevoid
Configures the on-disk mesh cache.
Downloaded geometry and textures are cached per graph node, so revisiting a location reads
from disk instead of the CDN, and an interrupted download resumes where it stopped rather
than starting over. Cached content never goes stale: a re-run of the mapping pipeline
publishes new node ids, so an id always names the same geometry.
Caching is off until this is called. It may be called again later. A changed budget applies
at once, to downloads already in progress too. Disabling only affects downloads started
afterward; one already in progress keeps the cache it started with.
createvoid
-
downloadAsyncResult<Array<MeshDownloaderData>, MeshDownloaderError>
[Deprecated] Asynchronously downloads a mesh for a given location payload.
This function suspends execution until the download operation is complete,
has failed, or has timed out.
downloadByAssetFlow<NSDKResult<MeshDownloaderData, MeshDownloaderError>>
Streams mesh chunks for a VPS map asset, sorted closest-first by GPS position.
MeshDownloader resolves the mesh sibling for [vpsMapAssetId] via SitesManager, then
downloads chunks. The flow completes normally once all chunks have been delivered. Any
failure is emitted as a terminal [NSDKResult.Error] whose code is the relevant
[MeshDownloaderError], ending the flow.
onDestroyvoid
-
onInitvoid
-