using System.Collections; using System.Collections.Generic; using UnityEngine; public class button_animation : MonoBehaviour { public AudioClip buttonTouchSound; // Suara button touch yang bisa ditambahkan sendiri private AudioSource audioSource; void Start() { audioSource = GetComponent(); } public void button_touch() { GetComponent().Play("Button_Touch"); if (buttonTouchSound != null) { audioSource.PlayOneShot(buttonTouchSound); } } }