Share via


SpatialAnchorStore.TrySave(String, SpatialAnchor) Méthode

Définition

Conserve une ancre dans le magasin.

public:
 virtual bool TrySave(Platform::String ^ id, SpatialAnchor ^ anchor) = TrySave;
bool TrySave(winrt::hstring const& id, SpatialAnchor const& anchor);
public bool TrySave(string id, SpatialAnchor anchor);
function trySave(id, anchor)
Public Function TrySave (id As String, anchor As SpatialAnchor) As Boolean

Paramètres

id
String

Platform::String

winrt::hstring

Identificateur de l’ancre. L’identificateur doit être unique au sein de votre application.

anchor
SpatialAnchor

Ancre à enregistrer.

Retours

Boolean

bool

True, si l’enregistrement a réussi ; sinon, false.

Remarques

Cette méthode peut retourner false dans les versions futures de Windows si un appareil a une limite de persistance d’ancre par application.

S’applique à