Does anyone know anything about this error? C:/buildslave/unity/build/Runtime/Audio/sound/SoundChannel.cpp(374) : Error executing result (An invalid seek position was passed to this function. ) UnityEngine.AudioSourcelay() I've seen only a few cases of it online and unable to find any information regarding the error in order to fix it. Any help would be greatly appreciated.
This is old, but we encountered this error as well. In our case, some code set audioSource.time, but did not verify that the time is logical when comparing to the played clip duration. Using audioSource.time = Mathf.Min(wantedTime, audioClip.length - 0.01f) did the trick (Not sure that const at the end is actually required.)
In my case, I was reusing the AudioSource for different SFX. Putting: source.time = 0f before source.Play (), did the trick to me
In my case an error occurred Code (CSharp): public static void SetClip(string name, bool useRandom) { var clip = _music.Where(m => m.name == name).FirstOrDefault(); if (useRandom) { _audio.time = Random.Range(0, clip.length); } else { _audio.time = 0; } _audio.clip = clip; _audio.Play(); } Solved the problem through audio stop at the beginning of the method Code (CSharp): _audio.Stop(); The error was that the time of the current clip was changing, and not the next one)