Beispiel #1
0
    //ループギミックの音
    public void GimmckSoundBgmPlay(Bgm str, out AudioSource audio)
    {
        string path = BGM_PATH + File(str.ToString());

        clip = Resources.Load <AudioClip>(path);

        GameObject go = Instantiate(Resources.Load <GameObject>("GameObject/AudioChild"));

        go.transform.parent = transform;
        audio      = go.GetComponent <AudioSource>();
        audio.loop = true;
        audio.clip = clip;
    }
Beispiel #2
0
        async void IAudioInputPort.Play(Bgm bgm)
        {
            _bgmAudio.clip = await Addressables.LoadAssetAsync <AudioClip>(bgm.ToString());

            _bgmAudio.Play();
        }