다음을 통해 공유


TrackingMapManager.ActivateApplicationExclusiveMapAsync Method

Definition

Creates and activates a new application-exclusive map.

public System.Threading.Tasks.Task<Guid> ActivateApplicationExclusiveMapAsync (Guid? existingMapId = default);
member this.ActivateApplicationExclusiveMapAsync : Nullable<Guid> -> System.Threading.Tasks.Task<Guid>
Public Function ActivateApplicationExclusiveMapAsync (Optional existingMapId As Nullable(Of Guid) = Nothing) As Task(Of Guid)

Parameters

existingMapId
Nullable<Guid>

Optional identifier to try reactivating a previously created map. If null is passed, a new map is created. If a non empty guid map is passed, the tracking manager tries to load the corresponding map. If the map cannot be found or loaded, a new map is created.

Returns

Task<Guid> which is completed when the system has created and activated an application-exclusive map. The Result property contains the guid of the activated map. If it is equal to existingMapId, it means that the existing map has been reloaded. If not, it means that a new map has been created.

Exceptions

Thrown when the TrackingMapManager does not support application-exclusive Maps or if a map change is already in progress.

Remarks

In order to take effect, the application must be the active, immersive 3D application. ActivateApplicationExclusiveMapAsync should only be called once the application has started rendering its 3D user interface (and not, for example, when the application first starts).

Applies to