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

KeywordManager breaks if disabled and re-enabled

Open pnolen opened this issue 10 years ago • 1 comments

The KeywordManager is set to be set up and potentially started on Start, and stopped and destroyed on destroy. However, Start occurs any time the object is enabled, so it can cause the keyword recognizer to throw errors if the game object is disabled and re-enabled.

The KeywordRecognizer should either be set up and started in Awake (which happens once in object lifetime), destroyed and disabled in OnDisable, or have a check to not create a new KeywordRecognizer if one is already set up.

pnolen avatar Jun 14 '16 01:06 pnolen

this is wrong. my apologies

pnolen avatar Jun 14 '16 01:06 pnolen