Add the following members variables into your AzureSpatialAnchorsScript class:
publicclassAzureSpatialAnchorsScript:MonoBehaviour{ /// <summary> /// The sphere prefab. /// </summary>publicGameObject spherePrefab; /// <summary> /// Set this string to the Spatial Anchors account id provided in the Spatial Anchors resource. /// </summary>protectedstring SpatialAnchorsAccountId ="Set me"; /// <summary> /// Set this string to the Spatial Anchors account key provided in the Spatial Anchors resource. /// </summary>protectedstring SpatialAnchorsAccountKey ="Set me"; /// <summary> /// Use the recognizer to detect air taps. /// </summary>privateGestureRecognizer recognizer; /// <summary> /// True if we are 1) creating + saving an anchor or 2) looking for an anchor. /// </summary>protectedbool tapExecuted =false; /// <summary> /// The ID of the CloudSpatialAnchor that was saved. Use it to find the CloudSpatialAnchor /// </summary>protectedstring cloudSpatialAnchorId =""; /// <summary> /// The sphere rendered to show the position of the CloudSpatialAnchor. /// </summary>protectedGameObject sphere;protectedMaterial sphereMaterial; /// <summary> /// Indicate if we are ready to save an anchor. We can save an anchor when value is greater than 1. /// </summary>protectedfloat recommendedForCreate =0;