/// <summary>
        /// Start is called on the frame when a script is enabled just before any
        /// of the Update methods are called the first time.
        /// </summary>
        public override void Start()
        {
            base.Start();

            if (!SanityCheckAccessConfiguration())
            {
                XRUXPickerForSharedAnchorDemo.Instance.GetDemoButtons()[2].gameObject.SetActive(false);
                XRUXPickerForSharedAnchorDemo.Instance.GetDemoButtons()[1].gameObject.SetActive(false);
                XRUXPickerForSharedAnchorDemo.Instance.GetDemoButtons()[0].gameObject.SetActive(false);
                XRUXPickerForSharedAnchorDemo.Instance.GetDemoInputField().gameObject.SetActive(false);
                return;
            }

            SpatialAnchorSamplesConfig samplesConfig = Resources.Load <SpatialAnchorSamplesConfig>("SpatialAnchorSamplesConfig");

            if (string.IsNullOrWhiteSpace(BaseSharingUrl) && samplesConfig != null)
            {
                BaseSharingUrl = samplesConfig.BaseSharingURL;
            }

            if (string.IsNullOrEmpty(BaseSharingUrl))
            {
                feedbackBox.text = $"Need to set {nameof(BaseSharingUrl)}.";
                XRUXPickerForSharedAnchorDemo.Instance.GetDemoButtons()[2].gameObject.SetActive(false);
                XRUXPickerForSharedAnchorDemo.Instance.GetDemoButtons()[1].gameObject.SetActive(false);
                XRUXPickerForSharedAnchorDemo.Instance.GetDemoButtons()[0].gameObject.SetActive(false);
                XRUXPickerForSharedAnchorDemo.Instance.GetDemoInputField().gameObject.SetActive(false);
                return;
            }
            else
            {
                Uri result;
                if (!Uri.TryCreate(BaseSharingUrl, UriKind.Absolute, out result))
                {
                    feedbackBox.text = $"{nameof(BaseSharingUrl)} is not a valid url";
                    return;
                }
                else
                {
                    BaseSharingUrl = $"{result.Scheme}://{result.Host}/api/anchors";
                }
            }

#if !UNITY_EDITOR
            anchorExchanger.WatchKeys(BaseSharingUrl);
#endif

            enableAdvancingOnSelect = false;

            feedbackBox.text = stateParams[currentAppState].StepMessage;

            Debug.Log("Azure Spatial Anchors Shared Demo script started");
            EnableCorrectUIControls();
        }
        /// <summary>
        /// Start is called on the frame when a script is enabled just before any
        /// of the Update methods are called the first time.
        /// </summary>
        public override void Start()
        {
            base.Start();

            /*
             * HttpClient c = new HttpClient();
             * Task<string> t = c.GetStringAsync(BaseSharingUrl + "/api/anchors/all");
             * string s = t.Result;
             * Console.WriteLine(s);
             */
            Debug.LogError("Clicked button. made it to 178");

            if (!SanityCheckAccessConfiguration())
            {
                XRUXPickerForMainMenu.Instance.GetDemoButtons()[1].gameObject.SetActive(false);
                XRUXPickerForMainMenu.Instance.GetDemoButtons()[0].gameObject.SetActive(false);
                XRUXPickerForMainMenu.Instance.GetDemoInputField().gameObject.SetActive(false);
                return;
            }

            SpatialAnchorSamplesConfig samplesConfig = Resources.Load <SpatialAnchorSamplesConfig>("SpatialAnchorSamplesConfig");

            if (string.IsNullOrWhiteSpace(BaseSharingUrl) && samplesConfig != null)
            {
                BaseSharingUrl = samplesConfig.BaseSharingURL;
            }

            if (string.IsNullOrEmpty(BaseSharingUrl))
            {
                feedbackBox.text = $"Need to set {nameof(BaseSharingUrl)}.";
                XRUXPickerForMainMenu.Instance.GetDemoButtons()[1].gameObject.SetActive(false);
                XRUXPickerForMainMenu.Instance.GetDemoButtons()[0].gameObject.SetActive(false);
                XRUXPickerForMainMenu.Instance.GetDemoInputField().gameObject.SetActive(false);
                return;
            }
            else
            {
                Uri result;
                if (!Uri.TryCreate(BaseSharingUrl, UriKind.Absolute, out result))
                {
                    feedbackBox.text = $"{nameof(BaseSharingUrl)} is not a valid url";
                    return;
                }
                else
                {
                    BaseSharingUrl = $"{result.Scheme}://{result.Host}/api/anchors";
                }
            }
            Debug.LogError("Clicked button. made it to 215");

#if !UNITY_EDITOR
            anchorExchanger.WatchKeys(BaseSharingUrl);
#endif

            feedbackBox.text = stateParams[currentAppState].StepMessage;

            EnableCorrectUIControls();

            Debug.LogError("Clicked button. made it to 225");

            // Jump right into locating anchors.
            //    InitializeLocateFlowDemo();
        }