/// <summary> /// Call to apply a custom spatial anchors account id and account key. Note, this call will change the authentication mode to ApiKey /// </summary> /// <param name="spatialAnchorsAccountId">account id</param> /// <param name="spatialAnchorsAccountKey">account key</param> public static CustomSpatialAnchorConfig Create(string spatialAnchorsAccountId, string spatialAnchorsAccountKey) { CustomSpatialAnchorConfig config = CreateInstance <CustomSpatialAnchorConfig>(); config.authenticationMode = AuthenticationMode.ApiKey; config.spatialAnchorsAccountId = spatialAnchorsAccountId; config.spatialAnchorsAccountKey = spatialAnchorsAccountKey; return(config); }
public SpatialAnchorsCoordinateService(GameObject parent, SpatialAnchorsConfiguration spatialAnchorsConfiguration) { this.gameThreadSynchronizationContext = SynchronizationContext.Current; this.parent = parent; this.spatialAnchorsConfiguration = spatialAnchorsConfiguration; if (this.parent != null) { Debug.Log("SpatialAnchorsCoordinateService: Creating a CustomSpatialAnchorManager."); SpatialAnchorConfig config = CustomSpatialAnchorConfig.Create(spatialAnchorsConfiguration.AccountId, spatialAnchorsConfiguration.AccountKey); spatialAnchorManager = this.parent.AddCustomSpatialAnchorManager(config); StartSession().FireAndForget(); } }