- UI_PointerButton.cs
- Only standard UI TriggerEvents
onPointerEnter, onPointerExit, onPointerUp, onPointerDown
- Toggle mode
- Only standard UI TriggerEvents
- UI_PhysicsButton.cs
- Standard UI TriggerEvents
onPointerEnter, onPointerExit, onPointerUp, onPointerDown
- Press by interactor
- Toggle mode
- Standard UI TriggerEvents
- UI_TriggerButton.cs
- Support standard UI TriggerEvents
onPointerEnter, onPointerExit, onPointerUp, onPointerDown
- Triggering by interactor
- Triggering when OnTriggerEnter, but you can disable it by turning off
isTriggerWhenOnEnter
- If you want to make Triggering by OnTriggerEnter + Button press, turn off
isTriggerWhenOnEnter
and provide button press logic
- If you want to make Triggering by OnTriggerEnter + Button press, turn off
- Toggle mode
- Support standard UI TriggerEvents
- Import prefabs from samples
- For support ray interactor from
Unity XR Intergaration Toolkit
import XRI_Support from samples and add defineUSE_UNITY_XRI_TOOLKIT
to project
- For support ray interactor from
- Put
buttons
andinteractor
to the scene
- When
interactor
OnTriggerEnter or OnTriggerExit to button, it adds or removes button fromList<>
- Interactor say to button about OnTriggerEnter or OnTriggerExit, and invoke Update in buttons
- Button determines whether is it pressed or not
- Visualizers visualize button state by color or press scale
- For Visuzl parameters use ScriptableObject
Create/ScriptableObjects/PhysicsButton/ButtonInteractionData
- Buttons can receive standard UI TriggerEvents
onPointerEnter, onPointerExit, onPointerUp, onPointerDown