6
6
using System . Collections . Generic ;
7
7
using HoloToolkit . Unity . InputModule ;
8
8
9
- #if UNITY_EDITOR || UNITY_WSA
9
+ #if UNITY_WSA || UNITY_STANDALONE_WIN
10
10
using UnityEngine . Windows . Speech ;
11
11
#endif
12
12
13
13
namespace HoloToolkit . Examples . InteractiveElements
14
14
{
15
15
/// <summary>
16
- /// Interactive exposes basic button type events to the Unity Editor and recieves messages from the GestureManager and GazeManager.
16
+ /// Interactive exposes basic button type events to the Unity Editor and receives messages from the GestureManager and GazeManager.
17
17
///
18
18
/// Beyond the basic button functionality, Interactive also maintains the notion of selection and enabled, which allow for more robust UI features.
19
19
/// InteractiveEffects are behaviors that listen for updates from Interactive, which allows for visual feedback to be customized and placed on
@@ -30,7 +30,7 @@ public class Interactive : MonoBehaviour, IInputClickHandler, IFocusable, IInput
30
30
public bool IsEnabled = true ;
31
31
32
32
/// <summary>
33
- /// Does the gameObect currently have focus?
33
+ /// Does the GameObject currently have focus?
34
34
/// </summary>
35
35
public bool HasGaze { get ; protected set ; }
36
36
@@ -50,7 +50,7 @@ public class Interactive : MonoBehaviour, IInputClickHandler, IFocusable, IInput
50
50
public float HoldTime = 0.5f ;
51
51
52
52
/// <summary>
53
- /// Configure the amount of time a rolloff update should occure . When building more advanced UI,
53
+ /// Configure the amount of time a roll off update should incur . When building more advanced UI,
54
54
/// we may need to evaluate what the next gazed item is before updating.
55
55
/// </summary>
56
56
public float RollOffTime = 0.02f ;
@@ -88,7 +88,7 @@ public enum ButtonStateEnum { Default, Focus, Press, Selected, FocusSelected, Pr
88
88
protected bool mCheckRollOff = false ;
89
89
protected bool mCheckHold = false ;
90
90
91
- #if UNITY_EDITOR || UNITY_WSA
91
+ #if UNITY_WSA || UNITY_STANDALONE_WIN
92
92
protected KeywordRecognizer mKeywordRecognizer ;
93
93
#endif
94
94
protected Dictionary < string , int > mKeywordDictionary ;
@@ -134,7 +134,7 @@ protected virtual void Start()
134
134
}
135
135
}
136
136
137
- #if UNITY_EDITOR || UNITY_WSA
137
+ #if UNITY_WSA || UNITY_STANDALONE_WIN
138
138
if ( ! KeywordRequiresGaze )
139
139
{
140
140
mKeywordRecognizer = new KeywordRecognizer ( mKeywordArray ) ;
@@ -206,7 +206,7 @@ public virtual void OnFocusExit()
206
206
207
207
private void SetKeywordListener ( bool listen )
208
208
{
209
- #if UNITY_EDITOR || UNITY_WSA
209
+ #if UNITY_WSA || UNITY_STANDALONE_WIN
210
210
if ( listen )
211
211
{
212
212
if ( KeywordRequiresGaze && mKeywordArray != null )
@@ -374,7 +374,7 @@ public void UnregisterWidget(InteractiveWidget widget)
374
374
}
375
375
}
376
376
377
- #if UNITY_EDITOR || UNITY_WSA
377
+ #if UNITY_WSA || UNITY_STANDALONE_WIN
378
378
protected virtual void KeywordRecognizer_OnPhraseRecognized ( PhraseRecognizedEventArgs args )
379
379
{
380
380
@@ -390,7 +390,7 @@ protected virtual void KeywordRecognizer_OnPhraseRecognized(PhraseRecognizedEven
390
390
#endif
391
391
392
392
/// <summary>
393
- /// Check if any state changes have occured , from alternate input sources
393
+ /// Check if any state changes have occurred , from alternate input sources
394
394
/// </summary>
395
395
protected void CompareStates ( )
396
396
{
@@ -510,7 +510,7 @@ protected virtual void OnDestroy()
510
510
511
511
protected virtual void OnEnable ( )
512
512
{
513
- #if UNITY_EDITOR || UNITY_WSA
513
+ #if UNITY_WSA || UNITY_STANDALONE_WIN
514
514
if ( mKeywordRecognizer != null && ! KeywordRequiresGaze )
515
515
{
516
516
SetKeywordListener ( true ) ;
@@ -520,7 +520,6 @@ protected virtual void OnEnable()
520
520
521
521
protected virtual void OnDisable ( )
522
522
{
523
- //SetKeywordListener(false);
524
523
OnFocusExit ( ) ;
525
524
}
526
525
}
0 commit comments