# XRScanningSubsystem Source: https://www.nianticspatial.com/docs/api/unity/NianticSpatial.NSDK.AR.XRSubsystems.XRScanningSubsystem/ XRScanningSubsystem > extends UnityEngine.SubsystemsImplementation.SubsystemWithProvider Defines an interface for interacting with scanning functionality. --- ## Declaration public class XRScanningSubsystem : SubsystemWithProvider ## Remarks This abstract class should be implemented by an XR provider and instantiated using the SubsystemManager to enumerate the available XRScanningSubsystemDescriptors. --- ## Constructors public XRScanningSubsystem() #### Summary Constructor. Do not invoke directly; use the SubsystemManager to enumerate the available XRScanningSubsystemDescriptors and call Create on the desired descriptor. --- ## Properties | Name | Type | Summary | | --- | --- | --- | | CurrentConfiguration | XRScanningConfiguration | Get or set configuration with | --- ## Methods | Name | Type | Summary | | --- | --- | --- | | ComputeVoxels | void | Request a voxel buffer to be computed. This is an async operation that takes some time. Obtain the result with TryGetVoxels. "enableVoxels" must be set to true on the XRScanningConfiguration | | DisposeVoxelBuffer | void | Dispose a voxel buffer previously obtained from TryGetVoxelBuffer | | GetFrameCount | int | - | | GetScanId | string | Get the current scan's ID. | | GetState | ScanningState | Get the current state of the scanning subsystem. | | GetVoxelSize | float | Get the current voxel size in meters. | | SaveCurrentScan | void | Save the current scan. Recording will stop after save. ScanID will be reset. | | TryGetRaycastBuffer | bool | Get the latest raycast textures. | | TryGetVoxelBuffer | bool | Get latest computed voxel buffer. This then must be later disposed with DisposeVoxelBuffer | --- ## Relationships derived: NsdkScanningSubsystem