unreal.AzureSpatialAnchorsLibrary
¶
- class unreal.AzureSpatialAnchorsLibrary(outer=None, name='None')¶
Bases:
unreal.BlueprintFunctionLibrary
A function library that provides static/Blueprint functions for AzureSpatialAnchors.
C++ Source:
Plugin: AzureSpatialAnchors
Module: AzureSpatialAnchors
File: AzureSpatialAnchorsFunctionLibrary.h
- classmethod config_session(account_id, account_key, coarse_localization_settings, log_verbosity) → bool¶
Configure the ASA session. This will take effect when the next session is started. This version is deprecated. Please use ConfigSession2 instead. deprecated: ConfigSession is deprecated, use ConfigSession2 instead.
- Parameters
account_id (str) – The Azure Spatial Anchor Account ID.
account_key (str) – The Azure Spatial Anchor Account Key.
coarse_localization_settings (CoarseLocalizationSettings) – Settings related to locating the device in the world (eg GPS).
log_verbosity (AzureSpatialAnchorsLogVerbosity) – Logging verbosity for the Azure Spatial Anchor api.
- Returns
(Boolean) True if the session configuration was set.
- Return type
- classmethod config_session2(session_configuration, coarse_localization_settings, log_verbosity) → bool¶
Configure the ASA session. This will take effect when the next session is started.
- Parameters
session_configuration (AzureSpatialAnchorsSessionConfiguration) – Azure cloud sign in related configuration.
coarse_localization_settings (CoarseLocalizationSettings) – Settings related to locating the device in the world (eg GPS).
log_verbosity (AzureSpatialAnchorsLogVerbosity) – Logging verbosity for the Azure Spatial Anchor api.
- Returns
(Boolean) True if the session configuration was set.
- Return type
- classmethod construct_cloud_anchor(ar_pin) -> (out_azure_cloud_spatial_anchor=AzureCloudSpatialAnchor, out_result=AzureSpatialAnchorsResult, out_error_string=str)¶
Construct a cloud anchor for the pin. This is not yet stored in the cloud.
- Parameters
ar_pin (ARPin) – The ARPin to create an anchor for.
- Returns
out_azure_cloud_spatial_anchor (AzureCloudSpatialAnchor): The Cloud anchor handle. (null if fails)
out_result (AzureSpatialAnchorsResult): The Result enumeration.
out_error_string (str): Additional informatiuon about the OutResult (often empty).
- Return type
tuple
- classmethod create_ar_pin_around_azure_cloud_spatial_anchor(pin_id, azure_cloud_spatial_anchor) → ARPin or None¶
Create an ARPin around an already existing cloud anchor.
- Parameters
pin_id (str) – The name of the pin we want created.
azure_cloud_spatial_anchor (AzureCloudSpatialAnchor) – The cloud anchor we will create the pin around.
- Returns
(Boolean) True if we were able to create.
out_ar_pin (ARPin): The pin that was created, or null.
- Return type
- classmethod create_cloud_anchor(ar_pin)¶
deprecated: ‘create_cloud_anchor’ was renamed to ‘construct_cloud_anchor’.
- classmethod create_session() → bool¶
Create an ASA session. It is not yet active.
- Returns
(Boolean) True if a session has been created (even if it already existed).
- Return type
- classmethod create_watcher(world_context_object, locate_criteria) -> (out_watcher_identifier=int32, out_result=AzureSpatialAnchorsResult, out_error_string=str)¶
Create and start a ‘Watcher’ searching for azure cloud spatial anchors as specified in the locate criteria. Use an AzureSpatialAnchorsEventComponent’s events to get notifications of found anchors and watcher completion.
- Parameters
world_context_object (Object) –
locate_criteria (AzureSpatialAnchorsLocateCriteria) – Structure describing the watcher we wish to start.
- Returns
out_watcher_identifier (int32): The ID of the created watcher (can be used to stop the watcher).
out_result (AzureSpatialAnchorsResult): The Result enumeration.
out_error_string (str): Additional information about the OutResult (often empty).
- Return type
tuple
- classmethod delete_cloud_anchor(world_context_object, latent_info, cloud_spatial_anchor) -> (out_result=AzureSpatialAnchorsResult, out_error_string=str)¶
Delete the cloud anchor in the cloud. This will start a Latent Action to delete the cloud anchor from the cloud service.
- Parameters
world_context_object (Object) –
latent_info (LatentActionInfo) –
cloud_spatial_anchor (AzureCloudSpatialAnchor) – The Cloud anchor to delete.
- Returns
out_result (AzureSpatialAnchorsResult): Result of the Delete attempt.
out_error_string (str): Additional information about the OutResult (often empty).
- Return type
tuple
- classmethod get_cached_session_status() → AzureSpatialAnchorsSessionStatus or None¶
Get the azure spatial anchors session status struct.
- Returns
(Boolean&) True if is an AzureSpatialAnchors plugin running. False probably means that this platform does not support ASA or the plugin for this platform is not enabled.
out_status (AzureSpatialAnchorsSessionStatus): The retrieved status struct.
- Return type
- classmethod get_cloud_anchor(ar_pin) → AzureCloudSpatialAnchor¶
Get the cloud anchor associated with a particular ARPin.
- Parameters
ar_pin (ARPin) – The ARPin who’s cloud anchor we hope to get.
- Returns
out_azure_cloud_spatial_anchor (AzureCloudSpatialAnchor): The cloud spatial anchor, or null.
- Return type
- classmethod get_cloud_anchors()¶
Get list of all CloudAnchors.
- Returns
out_cloud_anchors (Array(AzureCloudSpatialAnchor)): The cloud spatial anchors
- Return type
- classmethod get_session_status(world_context_object, latent_info) -> (out_status=AzureSpatialAnchorsSessionStatus, out_result=AzureSpatialAnchorsResult, out_error_string=str)¶
Get the AzureSpatialAnchors Session’s Status. This will start a Latent Action to get the Session Status.
- Parameters
world_context_object (Object) –
latent_info (LatentActionInfo) –
- Returns
out_status (AzureSpatialAnchorsSessionStatus): The retrieved status struct.
out_result (AzureSpatialAnchorsResult): Result of the Save attempt.
out_error_string (str): Additional information about the OutResult (often empty).
- Return type
tuple
- classmethod load_cloud_anchor(world_context_object, latent_info, cloud_identifier, pin_id) -> (out_ar_pin=ARPin, out_azure_cloud_spatial_anchor=AzureCloudSpatialAnchor, out_result=AzureSpatialAnchorsResult, out_error_string=str)¶
Load a pin from the cloud.. This will start a Latent Action to load a cloud anchor and create a pin for it.
- Parameters
world_context_object (Object) –
latent_info (LatentActionInfo) –
cloud_identifier (str) – The Azure Cloud Spatial Anchor Identifier of the cloud anchor we will try to load.
pin_id (str) – Specify the name of the Pin to load into. Will fail if a pin of this name already exists. If empty an auto-generated id will be used.
- Returns
out_ar_pin (ARPin): Filled in with the pin created, if successful.
out_azure_cloud_spatial_anchor (AzureCloudSpatialAnchor): Filled in with the UE4 representation of the cloud spatial anchor created, if successful.
out_result (AzureSpatialAnchorsResult): The Result enumeration.
out_error_string (str): Additional informatiuon about the OutResult (often empty).
- Return type
tuple
- classmethod refresh_cloud_anchor_properties(world_context_object, latent_info, azure_cloud_spatial_anchor) -> (out_result=AzureSpatialAnchorsResult, out_error_string=str)¶
Get the latest cloud anchor properties from the cloud. This will start a Latent Action to fetch the AzureCloudSpatialAnchor’s propertiesfrom the Azure Spatial Anchors cloud service.
- Parameters
world_context_object (Object) –
latent_info (LatentActionInfo) –
azure_cloud_spatial_anchor (AzureCloudSpatialAnchor) – The AzureCloudSpatialAnchor to refresh.
- Returns
out_result (AzureSpatialAnchorsResult): The Result enumeration.
out_error_string (str): Additional information about the OutResult (often empty).
- Return type
tuple
- classmethod save_cloud_anchor(world_context_object, latent_info, azure_cloud_spatial_anchor) -> (out_result=AzureSpatialAnchorsResult, out_error_string=str)¶
Save the cloud anchor to the cloud. This will start a Latent Action to save the AzureCloudSpatialAnchor to the Azure Spatial Anchors cloud service.
- Parameters
world_context_object (Object) –
latent_info (LatentActionInfo) –
azure_cloud_spatial_anchor (AzureCloudSpatialAnchor) – The AzureCloudSpatialAnchor to save.
- Returns
out_result (AzureSpatialAnchorsResult): The Result enumeration.
out_error_string (str): Additional information about the OutResult (often empty).
- Return type
tuple
- classmethod save_pin_to_cloud(world_context_object, latent_info, ar_pin, lifetime) -> (out_azure_cloud_spatial_anchor=AzureCloudSpatialAnchor, out_result=AzureSpatialAnchorsResult, out_error_string=str)¶
Save the pin to the cloud. This will start a Latent Action to save the ARPin to the Azure Spatial Anchors cloud service.
- Parameters
world_context_object (Object) –
latent_info (LatentActionInfo) –
ar_pin (ARPin) – The ARPin to save.
lifetime (float) – The lifetime time of the cloud pin in the cloud in seconds. <= 0 means no expiration. I would not expect expiration to be accurate to the second.
- Returns
out_azure_cloud_spatial_anchor (AzureCloudSpatialAnchor): The Cloud anchor handle.
out_result (AzureSpatialAnchorsResult): Result of the Save attempt.
out_error_string (str): Additional information about the OutResult (often empty).
- Return type
tuple
- classmethod save_pin_to_cloud_with_app_properties(world_context_object, latent_info, ar_pin, lifetime, app_properties) -> (out_azure_cloud_spatial_anchor=AzureCloudSpatialAnchor, out_result=AzureSpatialAnchorsResult, out_error_string=str)¶
Save the pin to the cloud. This will start a Latent Action to save the ARPin to the Azure Spatial Anchors cloud service.
- Parameters
world_context_object (Object) –
latent_info (LatentActionInfo) –
ar_pin (ARPin) – The ARPin to save.
lifetime (float) – The lifetime time of the cloud pin in the cloud in seconds. <= 0 means no expiration. I would not expect expiration to be accurate to the second.
app_properties (Map(str, str)) – Key-Value pairs of strings that will be stored to the cloud with the anchor. Use them to attach app-specific information to an anchor.
- Returns
out_azure_cloud_spatial_anchor (AzureCloudSpatialAnchor): The Cloud anchor handle.
out_result (AzureSpatialAnchorsResult): Result of the Save attempt.
out_error_string (str): Additional information about the OutResult (often empty).
- Return type
tuple
- classmethod start_session() → bool¶
Start a Session running. ASA will start collecting tracking data.
- Returns
(Boolean) True if a session has been started (even if it was already started).
- Return type
- classmethod stop_session() → bool¶
The session will stop, it can be started again.
- Returns
- Return type
- classmethod stop_watcher(watcher_identifier) → bool¶
Stop the specified Watcher looking for anchors, if it still exists.
- Parameters
watcher_identifier (int32) – The identifier of the watcher we are trying to stop.
- Returns
(Boolean) True if the watcher existed. False if it did not.
- Return type
- classmethod update_cloud_anchor_properties(world_context_object, latent_info, azure_cloud_spatial_anchor) -> (out_result=AzureSpatialAnchorsResult, out_error_string=str)¶
Save the cloud anchor’s properties to the cloud. This will start a Latent Action to save the AzureCloudSpatialAnchor properties to the Azure Spatial Anchors cloud service. This can fail if another client updates the anchor. If that happens you will have to call RefreshCloudAnchorProperties to get the updated values before you might UpdateCloudAnchorProperties sucessfully.
- Parameters
world_context_object (Object) –
latent_info (LatentActionInfo) –
azure_cloud_spatial_anchor (AzureCloudSpatialAnchor) – The AzureCloudSpatialAnchor to update.
- Returns
out_result (AzureSpatialAnchorsResult): The Result enumeration.
out_error_string (str): Additional information about the OutResult (often empty).
- Return type
tuple