// Use this for initialization void Start() { if (string.IsNullOrEmpty(SRGSFileName)) { Debug.LogError("Please specify an SRGS file name in GrammarManager.cs on " + name + "."); Debug.LogError("Please check your GameObject settings in GrammarManager.cs on " + name + "."); return; } // Instantiate the GrammarRecognizer, passing in the path to the SRGS file in the StreamingAssets folder. try { grammarRecognizer = new GrammarRecognizer(Application.streamingAssetsPath + "/" + SRGSFileName); grammarRecognizer.OnPhraseRecognized += GrammarRecognizer_OnPhraseRecognized; //grammarRecognizer.Start(); Debug.Log("grammarrec started"); Debug.Log(grammarRecognizer.GrammarFilePath); } catch { // If the file specified to the GrammarRecognizer doesn't exist, let the user know. Debug.LogError("Check the SRGS file name in the Inspector on GrammarManager.cs and that the file's in the StreamingAssets folder."); } gkws = GetComponent <GrammarKeywordSwitcher>(); cds = GetComponent <ColorDicatationService>(); DisableGrammarStatus(); }
void Start() { guidingVoiceBehavior = GuidingVoice.GetComponent <GuidingVoiceBehavior>(); tractorBehavior = TractorToModify.GetComponent <TractorBehavior>(); colorDicatationService = this.gameObject.transform.parent.GetComponentInChildren <ColorDicatationService>(); pointToObjectBehavior = this.gameObject.transform.parent.GetComponentInChildren <PointToObjectBehavior>(); if (pointToObjectBehavior == null) { Debug.LogError("no pointToObjectBehavior found", this); } else { Debug.Log("found pointToObjectBehavior", this); } LocationKeyWords.Add("WHERE"); ModificationKeyWords.Add("CHANGE"); ModificationKeyWords.Add("UPDATE"); ModificationKeyWords.Add("MODIFY"); ModificationKeyWords.Add("SET"); ModificationKeyWords.Add("COLOR"); }