Better than Interact()
.
- Support multiple input type
- Mouse Left Click
- Mouse Right Click
- Mouse Middle Click
- Mouse Scroll Up
- Mouse Scroll Down
- A Nice-looking tooltip ui
- Custom Event name
- Install this package.
- Drop
Prefab/DesktopInteractionSystem.prefab
into your scene. - Select a Layout for DesktopInteractionSystem in
DesktopInteractionPlayerController
. - Add
DesktopInteractionControl
script into your GameObject and create a Collider in it. - Set the GameObject's layer to the layer which use by the DesktopInteractionSystem.
- Setup the
DesktopInteractionControl
script. - Done.