Skip to content

Commit 7a73b31

Browse files
authored
Update README_Interactable.md
1 parent a6cd488 commit 7a73b31

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Documentation/README_Interactable.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The *DefaultInteractableStates* asset contains four states and utilizes the [`In
3232

3333
* **Press**: The object is being pointed at and a button or hand is pressing. The Press state out ranks Default and Focus. This state will also get set as a fallback to Physical Press.
3434

35-
* **Disabled**: The button should not be interactive and visual feedback will let the user know for some reason this button is not usable at this time. In theory, the disabled state could contain all other states, but when Enabled is turned off, the Disabled state trumps all other states.
35+
* **Disabled**: The button should not be interactive and visual feedback will let the user know if for some reason this button is not usable at this time. In theory, the disabled state could contain all other states, but when Enabled is turned off, the Disabled state trumps all other states.
3636

3737
A bit value (#) is assigned to the state depending on the order in the list.
3838

@@ -56,7 +56,7 @@ An *Interactable's* enabled property is different than the enabled property conf
5656

5757
**Input Actions**
5858

59-
Select the [input action](./Input/InputActions.md), from the input configuration or controller mapping profile, that the *Interactable* component should react to.
59+
Select the [input action](./Input/InputActions.md) from the input configuration or controller mapping profile that the *Interactable* component should react to.
6060

6161
This property can be configured at runtime in code via [`Interactable.InputAction`](xref:Microsoft.MixedReality.Toolkit.UI.Interactable.InputAction).
6262

@@ -145,7 +145,7 @@ Custom events can be created in two main ways:
145145

146146
#### Example of extending `ReceiverBase`
147147

148-
The [`CustomInteractablesReceiver`](xref:Microsoft.MixedReality.Toolkit.UI) class under `MixedRealityToolkit.Examples` displays status information about an *Interactable* and is an example how to create a custom Event Receiver.
148+
The [`CustomInteractablesReceiver`](xref:Microsoft.MixedReality.Toolkit.UI) class under `MixedRealityToolkit.Examples` displays status information about an *Interactable* and is an example of how to create a custom Event Receiver.
149149

150150
```c#
151151
public CustomInteractablesReceiver(UnityEvent ev) : base(ev, "CustomEvent")
@@ -185,7 +185,7 @@ public virtual void OnClick(InteractableStates state,
185185

186186
##### Displaying custom event receiver fields in the inspector
187187

188-
*ReceiverBase* scripts use [`InspectorField`](xref:Microsoft.MixedReality.Toolkit.Utilities.Editor.InspectorField) attributes to expose custom properties in the inspector. Here's an example of Vector3 a custom property with tooltip and label information. This property will show up as configurable in the inspector when an *Interactable* GameObject is selected and has the associated *Event Receiver* type added.
188+
*ReceiverBase* scripts use [`InspectorField`](xref:Microsoft.MixedReality.Toolkit.Utilities.Editor.InspectorField) attributes to expose custom properties in the inspector. Here's an example of Vector3, a custom property with tooltip and label information. This property will show up as configurable in the inspector when an *Interactable* GameObject is selected and has the associated *Event Receiver* type added.
189189

190190
```c#
191191
[InspectorField(Label = "<Property label>",Tooltip = "<Insert tooltip info>",Type = InspectorField.FieldTypes.Vector3)]
@@ -196,7 +196,7 @@ public Vector3 EffectOffset = Vector3.zero;
196196

197197
### Building a simple button
198198

199-
One can create a simple button by simply adding the *Interactable* component to a GameObject that is configured to receive input events. It can have has a collider on it or on a child to receive input. If using *Interactable* with a Unity UI based GameObjects it should be under the Canvas GameObject.
199+
One can create a simple button by adding the *Interactable* component to a GameObject that is configured to receive input events. It can have a collider on it or on a child to receive input. If using *Interactable* with a Unity UI based GameObjects, it should be under the Canvas GameObject.
200200

201201
Take the button one step further, by creating a new profile, assigning the GameObject itself and creating a new theme. Furthermore, use the *OnClick* event to make something happen.
202202

@@ -211,7 +211,7 @@ To make a button Toggle-able, change the the [`Selection Mode`](xref:Microsoft.M
211211

212212
While the [`SelectionMode`](xref:Microsoft.MixedReality.Toolkit.UI.SelectionModes) is set to Toggle, the *IsToggled* check box can be used to set the default value of the control at runtime initialization.
213213

214-
*CanSelect* means the the *Interactable* can go from *off* to *on* while the *CanDeselect* means the inverse.
214+
*CanSelect* means the *Interactable* can go from *off* to *on* while the *CanDeselect* means the inverse.
215215

216216
![Profile Toggle Visual Themes Example](Images/Interactable/Profile_toggle.png)
217217

@@ -249,7 +249,7 @@ Multi-Dimension selection mode is used to create sequential buttons, or a button
249249

250250
With dimensions being a numeric value, up to 9 themes can be added to control the text label or texture of the button for each speed setting, using a different theme for each of step.
251251

252-
Every click event will advance the `DimensionIndex` by 1 at runtime until the `Dimensions` value is reached then the cycle will reset to 0.
252+
Every click event will advance the `DimensionIndex` by 1 at runtime until the `Dimensions` value is reached. Then the cycle will reset to 0.
253253

254254
![Multi-Dimensional profile example](Images/Interactable/Profile_multiDimensions.png)
255255

@@ -329,7 +329,7 @@ public static void AddFocusEvents(Interactable interactable)
329329
}
330330
```
331331

332-
The example code below demonstrates how to add an [InteractableOnToggleReceiver](xref:Microsoft.MixedReality.Toolkit.UI.InteractableOnFocusReceiver), which listens for selected/deselected state transitions on toggle-able *Interactables*, and furthermore define action code to perform when the event instances fire.
332+
The example code below demonstrates how to add an [InteractableOnToggleReceiver](xref:Microsoft.MixedReality.Toolkit.UI.InteractableOnFocusReceiver), which listens for selected/deselected state transitions on toggle-able *Interactables*, and furthermore defines action code to perform when the event instances fire.
333333

334334
```c#
335335
public static void AddToggleEvents(Interactable interactable)

0 commit comments

Comments
 (0)