I didn’t see how you called pause (how canNextAudio changed)
And the pause method you called
private void PauseAudio()< /p>
{
audioSource.clip = audioGroup[playingIndex]; This line is a bit redundant (although there is no special problem if it is added)
audioSource.Pause();
}
The following are assumptions
If the playback content will not be paused, please check whether the call is successful
If the playback resumes after pausing Start from the beginning, check whether the same audioSource.clip is playing (for example, the content of New is played or switched back to other clips),
or whether audioSource.Play() is called repeatedly ;Method (call the play method again after playing, and the playback content will start from the beginning)
The conditions are insufficient, so we can only guess. Please ask for details.