/// <summary>
    /// Called as a build begins.
    /// </summary>
    /// <param name="report">A BuildReport containing information about the build, such as the target platform and output path.</param>
    public void OnPreprocessBuild(BuildReport report)
    {
        SpatialAnchorConfig config = Resources.Load <SpatialAnchorConfig>("SpatialAnchorConfig");

        if (string.IsNullOrWhiteSpace(config.SpatialAnchorsAccountId) || string.IsNullOrWhiteSpace(config.SpatialAnchorsAccountKey))
        {
            Debug.LogWarning(@"Missing security values in AzureSpatialAnchors.SDK\Resources\SpatialAnchorConfig");
        }
    }
Exemplo n.º 2
0
 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();
     }
 }