Ok the solution MUST be simple but I just can’t find it, it’s so frustrating ><
I have a simple object with a “Selectable” Component and a custom “PlaySound” Component.
My goal is just to play a sound when this object is selected, exept I can’t find any event on with I could plug my custom method
My playsound Component is basicaly
public class PlaySound: MonoBehaviour
{
private void OnEnable()
{
//GetComponent<Selectable>().OnSelect += HandleOnSelectEvent;
//Not working because OnSelect in not an event
}
void HandleOnSelectEvent(){
print("WIP: Now I play my UISelected Sound");
}
What am I missing?