-
Notifications
You must be signed in to change notification settings - Fork 1
Selection
Namespace: WIDVE.Utilities
Location: Utilities/Selection
The Selection family of scripts provide ways to target and select various objects in the scene. There is also functionality for highlighting objects that can be selected.
This interface allows components to be selected. Components must implement the Select method, which is triggered when they are selected.
This interface lets components react to a Selector hovering over them, but not selecting them. The StartHighlight method is called when a Selector begins hovering over an object, and the EndHighlight methos is called when the Selector moves away.
The OnSelect component can be used to trigger a simple UnityEvent in response to a selection. This is the best method to set up a quick selectable object in the Inspector.
The Selector component is an abstract class that is used for selecting objects in the scene.
| Property | Description |
|---|---|
| Layers | Objects on these layers will be selected |
| HighlightLayers | Objects on these layers will be highlighted |
| SeparateHighlightLayers | If this is unchecked, HighlightLayers is unused. Instead, the Layers layer mask is used for both selection and highlighting |
| TriggerButton | A ButtonFloat that is used to activate a selection |
| TriggerThreshold | When the TriggerButton exceeds this value, a selection is triggered |