Class ARKitSessionSubsystem
ARKit implementation of the XRSessionSubsystem
. Do not create this directly. Use the SubsystemManager
instead.
Inheritance
Namespace: UnityEngine.XR.ARKit
Syntax
public sealed class ARKitSessionSubsystem : XRSessionSubsystem
Properties
worldMappingStatus
Get the world mapping status. Used to determine the suitability of the current session for creating an ARWorldMap.
Declaration
public ARWorldMappingStatus worldMappingStatus { get; }
Property Value
Type | Description |
---|---|
ARWorldMappingStatus | The ARWorldMappingStatus of the session. |
worldMapSupported
Detect ARWorldMap support. ARWorldMap
requires iOS 12 or greater.
Declaration
public bool worldMapSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
See Also
Methods
ApplyWorldMap(ARWorldMap)
Declaration
public void ApplyWorldMap(ARWorldMap worldMap)
Parameters
Type | Name | Description |
---|---|---|
ARWorldMap | worldMap |
CreateProvider()
Creates the provider interface.
Declaration
protected override IProvider CreateProvider()
Returns
Type | Description |
---|---|
IProvider | The provider interface for ARKit |
GetARWorldMapAsync()
Asynchronously create an ARWorldMap. An ARWorldMap
represents the state of the session and can be serialized to a byte
array to persist the session data, or send it to another device for
shared AR experiences.
It is a wrapper for ARKit's ARWorldMap.
Declaration
public ARWorldMapRequest GetARWorldMapAsync()
Returns
Type | Description |
---|---|
ARWorldMapRequest | An ARWorldMapRequest which can be used to determine the status
of the request and get the |
See Also
GetARWorldMapAsync(Action<ARWorldMapRequestStatus, ARWorldMap>)
Asynchronously create an ARWorldMap. An ARWorldMap
represents the state of the session and can be serialized to a byte
array to persist the session data, or send it to another device for
shared AR experiences.
It is a wrapper for ARKit's ARWorldMap.
If the ARWorldMapRequestStatus is Success, then the resulting ARWorldMap must be disposed to avoid leaking native resources. Otherwise, the ARWorldMap is not valid, and need not be disposed.
Declaration
public void GetARWorldMapAsync(Action<ARWorldMapRequestStatus, ARWorldMap> onComplete)
Parameters
Type | Name | Description |
---|---|---|
System.Action<ARWorldMapRequestStatus, ARWorldMap> | onComplete | A method to invoke when the world map has either been created, or determined that it could not be created. Check the value of the ARWorldMapRequestStatus parameter to determine whether the world map was successfully created. |