You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I want to be able pause and resume music. I just started using JSAM and I didn't see how to do this in docs, so I wanted to ask what's the better way to do it properly. Since method StopAllMusic calls Stop and not Pause, right now, the only idea I have is to access all audio sources and call AudioSource.Pause, but surely there should be a better way to do it? What I want at the end is to pause all sounds, except UI.
The text was updated successfully, but these errors were encountered:
There is currently no helper API to pause all audio in one go, I'll be adding that in the next update.
In the meantime, besides accessing all AudioSources, one workaround is to use JSAM's time scaling feature. In the case that you are pausing all audio for the implementation of a "Pause" menu, changing the Time.timeScale value also affects the pitch of audio objects with time-scaling enabled, so setting Time.timeScale to 0 will pause all audio. In case this doesn't work, make sure Time Scaled Sounds is enabled in the JSAM Project Settings.
Hi! I want to be able pause and resume music. I just started using JSAM and I didn't see how to do this in docs, so I wanted to ask what's the better way to do it properly. Since method StopAllMusic calls Stop and not Pause, right now, the only idea I have is to access all audio sources and call AudioSource.Pause, but surely there should be a better way to do it? What I want at the end is to pause all sounds, except UI.
The text was updated successfully, but these errors were encountered: