コード例 #1
0
    private void PlayAudio(AddressableAudioSource clipToPlay)
    {
        if (clipToPlay == null)
        {
            return;
        }

        SoundAmbientManager.StopAudio(playing);
        playing = clipToPlay;
        SoundAmbientManager.PlayAudio(clipToPlay);
    }
コード例 #2
0
    private void PlayAudio(AudioClip clipToPlay)
    {
        if (clipToPlay == null)
        {
            return;
        }

        SoundAmbientManager.StopAudio(currentTrack);
        currentTrack = clipToPlay;
        SoundAmbientManager.PlayAudio(currentTrack, isLooped: true);
    }