public void Construct(FIUISoundPlayer _uiSoundPlayer) { uiSoundPlayer = _uiSoundPlayer; GetComponent <Button>().onClick.AddListener(new UnityEngine.Events.UnityAction(() => { uiSoundPlayer.Play(clip); })); }
public void OnPointerClick(PointerEventData eventData) { uiSoundPlayer.Play(clip); }