예제 #1
0
    //private IEnumerator LoadConfig()
    //{
    //    yield return StartCoroutine(appState.LoadConfiguration(configUrl));
    //}

    IEnumerator Start()
    {
        Debug.Log("Initializing...");
        yield return(StartCoroutine(appState.LoadConfiguration(configUrl)));

        appState.Camera = gameObject;
        // init cursor next for sessionmanager
        appState.Cursor = cursor = Instantiate(_cursorFab, new Vector3(0, 0, 1), transform.rotation);
        cursor.GetComponent <Cursor>().enabled = true;
        cursor.name = "Cursor";

        // session manager is nesscary for speech so init that next
        sessionMgr = SessionManager.Instance;
        sessionMgr.cursorPrefab = _cursorFabOther;
        sessionMgr.Init(cursor);
        // then add the terrain this will build the symboltargethandler which needs the sessionmanagr
        appState.AddTerrain();
        // init the speech dictionarys but do not start listiningen to the commands yet
        appState.Speech.Init();
        //save the speech lokal to add commands
        speech = appState.Speech;
        // init views which adds speech commands
        InitViews();
        // init the hud after all speech commands have been added
        InitHud();
        // Finally start speech commands!
        appState.Speech.StartListining();
    }
예제 #2
0
    void Start()
    {
        appState.Camera = gameObject;
        appState.Speech = new Assets.Scripts.SpeechManager();

        appState.AddTerrain();
        InitViews();
        InitSpeech();


#if (NETFX_CORE)
        InitMqtt();
#endif
        includeAnchorMovingScript();

        appState.Speech.Init();
    }