Search Issue Tracker
Fixed
Fixed in 2021.3.49f1, 2022.3.58f1, 6000.1.0b5, 6000.2.0a2, 7000.0.0a19
Votes
1
Found in
2021.3.45f1
2022.3.55f1
6000.0.32f1
6000.1.0a9
Issue ID
UUM-91654
Regression
No
Audio does not resume playing in Timeline when timeScale is set to 0 and back to 1 after the remainder of the Audio has passed in real-time
How to reproduce:
1. Open the “TimelineAudioBugReport.zip“ project
2. Open the “TimelineAudioPauseBug“ Scene
3. Enter Play Mode
4. Press the “Play“ Button in the Game view
5. Press the “Timescale 0“ button and after 5 seconds press the “Timescale 1“ button
6. Observe the audio
Expected result: Audio continues from where it was paused
Actual result: Audio finishes prematurely
Reproducible in: 1.6.5 (2021.3.44f1), 1.7.6 (2021.3.44f1, 2022.3.47f1), 1.8.7 (2021.3.44f1, 2022.3.47f1, 6000.0.20f1)
Reproduced on: Windows 11 Pro (23H2)
Not reproduced on: No other environment tested
Notes:
- Timeline Playhead stays in the same place, indicating that the audio as well as animation should stop
- If the Timescale is set to 1 before the audio is supposed to end, it will continue from where it stopped
- Sometimes an audio artifact can be heard when the audio is supposed to end
- If audio is played through the “AudioSource.PlayOneShot” method it will not stop when the timescale is set to 0
Comments (1)
-
Skydome
Oct 14, 2024 09:21
Workaround for other people that are running into this issue. PlayableDirector.Pause() and PlayableDirector.Resume() do not have this issue.
My Pause function now looks like this:
public void PauseGame(bool pause)
{
if (pause)
{
Time.timeScale = 0f;// Pause all active PlayableDirectors
foreach (PlayableDirector director in FindObjectsOfType<PlayableDirector>())
{
if (director.isActiveAndEnabled)
{
director.Pause();
}
}
}
else
{
Time.timeScale = 1f;// Resume all active PlayableDirectors
foreach (PlayableDirector director in FindObjectsOfType<PlayableDirector>())
{
if (director.isActiveAndEnabled)
{
director.Resume();
}
}
}
}
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Shader Graph Asset icon is not shown on creation unless you confirm the name
- APV Sky occlusion doesn't consider the terrain
- [iOS] "EXC_BAD_ACCESS" Player crash when Script Debugging is enabled
- Cursor skips input fields when tabbing between two sets of input fields
- "Shader error redefinition of 'Varyings'" error appears when selecting the shader
Resolution Note (fix version 7000.0.0a19):
Fixed a bug that would cause the audio to not resume properly after unpausing a timeline.
Resolution Note (fix version 6000.2.0a2):
Fixed a bug that would cause the audio to not resume properly after unpausing a timeline.
Resolution Note (fix version 6000.1.0b5):
Fixed a bug that would cause the audio to not resume properly after unpausing a timeline.
Resolution Note (fix version 2022.3.58f1):
Fixed a bug that would cause the audio to not resume properly after unpausing a timeline.
Resolution Note (fix version 2021.3.49f1):
Fixed a bug that would cause the audio to not resume properly after unpausing a timeline.