Jaa


SpatialAnchorStore.TrySave(String, SpatialAnchor) Method

Definition

Persists an anchor to the store.

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

Parameters

id
String

Platform::String

winrt::hstring

An identifier for the anchor. The identifier must be unique within your app.

anchor
SpatialAnchor

The anchor to save.

Returns

Boolean

bool

True, if the save succeeded; otherwise, false.

Remarks

This method may return false in future versions of Windows if a device has a per-app anchor persistence limit.

Applies to