// Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Alpha1))
        {
            Debug.Log("1");
            // Init MoveCamera location
            MoveCamera moveCamera = GetComponent <MoveCamera>();
            moveCamera.UpdateLocation("espoo");
        }

        if (Input.GetKeyDown(KeyCode.Alpha2))
        {
            Debug.Log("2");
            // Init MoveCamera location
            MoveCamera moveCamera = GetComponent <MoveCamera>();
            moveCamera.UpdateLocation("church");
        }

        if (Input.GetKeyDown(KeyCode.Alpha3))
        {
            Debug.Log("3");
            // Init MoveCamera location
            MoveCamera moveCamera = GetComponent <MoveCamera>();
            moveCamera.UpdateLocation("suomenlinna");
        }

        if (Input.GetKeyDown(KeyCode.Alpha4))
        {
            Debug.Log("4");
            // Init MoveCamera location
            MoveCamera moveCamera = GetComponent <MoveCamera>();
            moveCamera.UpdateLocation("fjord");
        }
    }
    // Use this for initialization
    IEnumerator Start()
    {
        // make sure the recordingtext is off
        RecordingText.SetActive(false);

        // Init MoveCamera location
        MoveCamera moveCamera = GetComponent <MoveCamera>();

        moveCamera.UpdateLocation("espoo");

        // check access to the Microphone
        yield return(Application.RequestUserAuthorization(UserAuthorization.Microphone));

        if (!Application.HasUserAuthorization(UserAuthorization.Microphone))
        {
            throw new NotSupportedException("Microphone using not authorized");
        }

        ServicePointManager.ServerCertificateValidationCallback = (a, b, c, d) =>
        {
            return(true);
        };

        const string SUBSCRIPTION_KEY = "8a414957-b4a9-45e7-8af7-d942f77ff7ff";
        const string ACCESS_TOKEN     = "7cbe30ec8f6342fbb2c2e8baa80dec3e";

        var config = new AIConfiguration(SUBSCRIPTION_KEY, ACCESS_TOKEN, SupportedLanguage.English);

        apiAiUnity = new ApiAiUnity();
        apiAiUnity.Initialize(config);

        apiAiUnity.OnError  += HandleOnError;
        apiAiUnity.OnResult += HandleOnResult;

        landmarks = new Dictionary <string, Landmark>();

        landmarks.Add("Helsinki Cathedral", new Landmark("Helsinki Cathedral", "church"));
        landmarks.Add("Design Factory", new Landmark("Design Factory", "espoo"));
        landmarks.Add("Fortress of Finland", new Landmark("Fortress of Finland", "suomenlinna"));
        landmarks.Add("FJORD Helsinki", new Landmark("FJORD Helsinki", "fjord"));

        //landmarks.Add( "The University of Helsinki",  new Landmark("The University of Helsinki", "university"));
        //landmarks.Add( "The Senate Square",           new Landmark("The Senate Square",          "square"));
    }
    void showLandmark(string key)
    {
        Debug.Log("Show landmark: " + key);

        UI ui = GetComponent <UI>();

        ui.setText(key);

        Landmark landmark = landmarks[key];

        // -> camera
        // -> camera target
        // todo : animate main camera to new camera position
        string     container  = landmark.getContainer();
        MoveCamera moveCamera = GetComponent <MoveCamera>();

        moveCamera.UpdateLocation(container);

        Debug.Log("Landmark object:");
        Debug.Log(container);
        Debug.Log(landmark.getName());
    }