Search Unity

Warnings when pausing game and Audio Sources playing in timeline

Discussion in 'Timeline' started by elettrozero, May 14, 2018.

  1. elettrozero

    elettrozero

    Joined:
    Jun 19, 2016
    Posts:
    216
    When I go pause the game by setting Time.timeScale = 0; and putting to pause every Audio Source that is playing - and one is controlled by TimeLine - the console floods with this:

    Code (CSharp):
    1. AudioClipPlayable.StartDelay: Setting new delay when existing delay is too small or 0.0 (0), audio system will not be able to change in time
    2. UnityEngine.Timeline.TimelinePlayable:PrepareFrame(Playable, FrameData)
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    The spam is happening because timeline keeps replaying the same frame over and over and the audio in timeline is constantly rescheduling.

    You could try also pausing the playable director, although that makes the timeline not update at all which, may have other problems while paused (like not updating animation).

    You could mute the track(s) and then call playableDirector.RebuildGraph(). There's a small performance penalty for doing that, but that may be acceptable if you are pausing.

    Hopefully one of those suggestions does the trick in your case. Feel free to file a bug though, I think this is simply an edge case that we missed.