diff --git a/org.mixedrealitytoolkit.uxcore/SeeItSayIt/SeeItSayItLabelEnabler.cs b/org.mixedrealitytoolkit.uxcore/SeeItSayIt/SeeItSayItLabelEnabler.cs index 4356210fb..be5544fa9 100644 --- a/org.mixedrealitytoolkit.uxcore/SeeItSayIt/SeeItSayItLabelEnabler.cs +++ b/org.mixedrealitytoolkit.uxcore/SeeItSayIt/SeeItSayItLabelEnabler.cs @@ -165,17 +165,19 @@ protected virtual void Start() protected virtual void OnDestroy() { -#if MRTK_INPUT_PRESENT && MRTK_SPEECH_PRESENT && UNITY_LOCALIZATION_PRESENT +#if MRTK_INPUT_PRESENT && MRTK_SPEECH_PRESENT if (pressableButton != null) { pressableButton.OnSpeechRecognitionKeywordChanged.RemoveListener(UpdateLabel); +#if UNITY_LOCALIZATION_PRESENT if (!localizedPattern.IsEmpty) { localizedPattern.StringChanged += OnLocalizedPatternChanged; } +#endif } #endif - } + } protected virtual void UpdateLabel(string keyword) {