IsdkPointerEventAudioPlayer provides functionality for playing sounds in response to the various states of an interaction. You can play sounds for hover, unhover, select, unselect, etc. without the need to manually set up all of the logic to handle those events and play the sounds.IsdkPointerEventAudioPlayer references the interactable component, Pointable, in an interactable object and registers itself to receive broadcasts of interaction events for that interactable component. When an interactor interacts with the interactable, the IsdkPointerEventAudioPlayer receives a notification and plays the sound corresponding to the new state of the interactable.SetPointable() function. In general, you will set this at BeginPlay, but it can be set at any time during play depending on your use case.
IsdkPointerEventAudioPlayer uses AudioComponents to determine the sounds to play.| Audio Component | Description |
|---|---|
HoverAudio | Sound to play when the interactable goes from being unhovered to hovered. |
UnhoverAudio | Sound to play when the interactable goes from being hovered to unhovered. |
SelectAudio | Sound to play when the interactable goes from being hovered to selected. |
UnselectAudio | Sound to play when the interactable goes from being selected to hovered. |
MoveAudio | Sound to play when the interactor moves while the interactable is either hovered or selected. |
CancelAudio | Sound to play when the interaction is canceled while the interactable is either hovered or selected. |
AudioComponent to the interactable object for each state you want to play a sound for. Use the Set*Audio() functions to assign the AudioComponents to the IsdkPointerEventAudioPlayer during BeginPlay.