Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


XRMeshSubsystem

Allows external systems to provide dynamic meshes to Unity.
Read time 2 minutesLast updated 12 days ago

Definition

public class XRMeshSubsystem : IntegratedSubsystem<XRMeshSubsystemDescriptor>, ISubsystem

Remarks

The XRMeshSubsystem enables external systems to provide dynamic meshes to Unity. The meshes are processed on background threads, including physics baking, so as not to block the main thread during execution. This is useful for that provide dynamic meshes during runtime, such as spatially-aware AR devices.

Properties

Property

Description

meshDensityCall this function to request a change in the density of the generated Meshes. Unity gives the density level as a value within the range 0.0 to 1.0 and the provider determines how to map that value to their implementation. Setting this value does not guarantee an immediate change in the density of any currently created Mesh and may only change the density for new or updated Meshes.
submeshClassificationEnabledGet this property to determine the currently requested state of submesh classification. Set this property to True to enable submesh classification, if the platform supports it. Set it to False to disable. Note that this property may require a restart of the subsystem in order to take effect.

Methods

Method

Description

GenerateMeshAsyncRequests the generation of the Mesh with MeshId
meshId
. Unity calls
onMeshGenerationComplete
when generation finishes.
GetUpdatedMeshTransformsGets the updated mesh transforms.
SetBoundingVolumeSet the bounding volume to restrict the space in which Unity generates and tracks Meshes.
TryGetMeshInfosGets information about every Mesh the system currently tracks.
TryGetSubmeshClassificationsGets classification information for vertices or vertex sets for meshes obtained through XRMeshSubsystem.TryGetMeshInfos. This must be enabled through _submeshClassificationEnabled.

Inheritance