MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

Reload keyword in speech input handler

Open cybergoulion opened this issue 9 years ago • 4 comments

As it is, when the speech input source keywords are changed, the changes are not reflected in the speech input handler, as the list is updated only once in OnEnable(). One simple solution is to just create a button to reload them as needed. I did that and it looks like the screenshot bellow. It works ok. If there is no better solution I could create a pull request with the changes. image

cybergoulion avatar Sep 20 '17 22:09 cybergoulion

@cybergoulion please submit a PR, thanks.

Although, simply moving from OnEnable to Update or OnInspectorGUI should also fix the issue.

StephenHodgson avatar Sep 20 '17 22:09 StephenHodgson

Yes, probably. I will try this tomorrow and submit a PR with a solution either way.

cybergoulion avatar Sep 21 '17 00:09 cybergoulion

@StephenHodgson I moved the code in OnIspectorGUI after all. Seems to work fine and needs no extra action to update now.

cybergoulion avatar Sep 21 '17 08:09 cybergoulion

Awesome!

StephenHodgson avatar Sep 21 '17 17:09 StephenHodgson