SpatialAnchorStore.TrySave(String, SpatialAnchor) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.