Exemple #1
0
    public void PlayBGM(string soundName)
    {
        AudioClipData clipData = BGMData.Find(soundName);

        audioSource.volume = clipData.volume;
        audioSource.clip   = clipData.clip;
        audioSource.Play();
    }
Exemple #2
0
    public void PlaySE(string soundName)
    {
        AudioClipData clipData = SEData.Find(soundName);

        audioSource.PlayOneShot(clipData.clip, clipData.volume);
    }