Skip to content

Commit 2c05b97

Browse files
committed
fixing regions
1 parent 0d6ac2b commit 2c05b97

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

Assets/MixedRealityToolkit-SDK/Features/UX/Scripts/Receivers/InteractionReceiver.cs

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,14 @@ public List<GameObject> Targets
6060

6161
#endregion
6262

63-
#region private variables
6463
/// <summary>
6564
/// When true, this interaction receiver will draw connections in the editor to Interactables and Targets
6665
/// </summary>
6766
[Tooltip( "When true, this interaction receiver will draw connections in the editor to Interactables and Targets" )]
6867
[SerializeField]
6968
private bool drawEditorConnections = true;
70-
71-
#endregion
69+
70+
#region MonoBehaviour implementation
7271

7372
/// <summary>
7473
/// On enable, set the BaseInputHandler's IsFocusRequired to false to receive all events.
@@ -79,20 +78,6 @@ protected override void OnEnable()
7978
base.OnEnable();
8079
}
8180

82-
/// <summary>
83-
/// Register an interactable with this receiver.
84-
/// </summary>
85-
/// <param name="interactable">takes a GameObject as the interactable to register.</param>
86-
public virtual void RegisterInteractable( GameObject interactable )
87-
{
88-
if ( interactable == null || interactables.Contains( interactable ) )
89-
{
90-
return;
91-
}
92-
93-
interactables.Add( interactable );
94-
}
95-
9681
/// <summary>
9782
/// When selected draw lines to all linked interactables
9883
/// </summary>
@@ -130,6 +115,21 @@ protected virtual void OnDrawGizmosSelected()
130115
}
131116
}
132117

118+
#endregion
119+
120+
/// <summary>
121+
/// Register an interactable with this receiver.
122+
/// </summary>
123+
/// <param name="interactable">takes a GameObject as the interactable to register.</param>
124+
public virtual void RegisterInteractable( GameObject interactable )
125+
{
126+
if ( interactable == null || interactables.Contains( interactable ) )
127+
{
128+
return;
129+
}
130+
131+
interactables.Add( interactable );
132+
}
133133

134134
/// <summary>
135135
/// Function to remove an interactable from the linked list.
@@ -166,6 +166,8 @@ protected bool IsInteractable( GameObject interactable )
166166
return ( interactables != null && interactables.Contains( interactable ) );
167167
}
168168

169+
#region Global Listener Callbacks
170+
169171
public void OnBeforeFocusChange( FocusEventData eventData ) { /*Unused*/ }
170172

171173
public void OnFocusChanged( FocusEventData eventData )
@@ -181,8 +183,6 @@ public void OnFocusChanged( FocusEventData eventData )
181183
}
182184
}
183185

184-
#region Global Listener Callbacks
185-
186186
public void OnGestureStarted( InputEventData eventData )
187187
{
188188
if ( IsInteractable( eventData.selectedObject ) )
@@ -244,6 +244,7 @@ public void OnGestureCompleted( InputEventData<float> eventData )
244244
}
245245

246246
}
247+
247248
public void OnGestureCompleted( InputEventData<Vector2> eventData )
248249
{
249250
if ( IsInteractable( eventData.selectedObject ) )
@@ -270,14 +271,14 @@ public void OnGestureCompleted( InputEventData<Quaternion> eventData )
270271
}
271272

272273
}
273-
274274
public void OnGestureCanceled( InputEventData eventData )
275275
{
276276
if ( IsInteractable( eventData.selectedObject ) )
277277
{
278278
GestureCanceled( eventData.selectedObject, eventData );
279279
}
280280
}
281+
281282
public void OnInputUp( InputEventData eventData )
282283
{
283284
if ( IsInteractable( eventData.selectedObject ) )

0 commit comments

Comments
 (0)