public IEnumerator CoroutineAddress()
    {
        Debug.Log("Coroutine Address Started");
        yield return(new WaitUntil(() => map.isReady == true));

        while (true)
        {
            yield return(new WaitForSeconds(5f));

            if (player.transform.position != lastPosition)
            {
                Debug.Log("Player moved");
                locationTextMeshAddress.text = BingMapsClassesLocatorScript.getAddress();
                yield return(null);

                Debug.Log("CoroutineAddress: " + Time.time);
            }
        }
    }
Esempio n. 2
0
    public void myLocationButtonPressed()
    {
        if (buttonSelector.getLastClicked() != buttonID)
        {
            firstClick();
        }
        else
        {
            string addressString = locator.getAddress();
            string bingMapsQuery = string.Format("https://bing.com/maps/default.aspx?where1={0}", addressString);

                        #if UNITY_ANDROID
            Debug.Log("Android branch mylocastion");
            bingMapsQuery = string.Format("http://maps.google.com/?q={0}", addressString);
                        #endif

            Application.OpenURL(bingMapsQuery);
            buttonSelector.setLastClickedId("");
        }
    }