|
Post by ParanoidGiants on Aug 11, 2021 13:40:11 GMT
Hi DarkTonic team,
We did not see anything like this issue on this forum, so apologies for duplicates.
Environment: Unity3D
Setup: Scene A, B
A: Inherits MasterAudio & PlaylistController game object. MasterAudio is set up with two different playlists. SceneATheme, SceneBTheme. Both hold multiple tracks as Resource Files, the last one looping. MasterAudio is set to persisting scenes. B: Inherits a dynamic group control for SFX. A game object of Scene B got the "Event Sounds" script with a trigger on "Enable", switching the playlists. The playlist and playlist controller name is hardcoded.
Issue: When changing the scene, MA does switch the playlists as shown by Inspector. "Start Playlist?" is set, MA indicates "playing.." for the playlist but the track is not played at all. The "remaining seconds" are frozen at track length. We tried triggering by different game objects of B, but the result is always the same. When not switching playlists at all (no event sound trigger), then the SceneATheme runs through, as expected. So the MA and PlaylistController still persist in the scene, as desired.
Thank you for your help!
-FroBros
|
|
|
Post by DarkTonic Dev on Aug 11, 2021 16:39:24 GMT
I will take a look and get back to you, thank you.
|
|
|
Post by ParanoidGiants on Aug 12, 2021 12:43:41 GMT
Edit:
The playlist is switched successfully when loading the new scene. After a certain amount of seconds, a track of the second playlist is played! Then, after the track finishes, everything is silent again. Weird behaviour. Maybe, this description already occured in another sense.
-FroBros
|
|
|
Post by DarkTonic Dev on Aug 12, 2021 19:32:29 GMT
Thanks. I set it up as accurately as I could given your information above. It switched to the new Playlist fine, and it also proceeded to the next song in that Playlist when done. I can't reproduce it.
You can send me an Example scene if you'd like me to look into and debugging it. support@darktonic.com or PM me with a link here.
-Brian
|
|
ululu
New Member
Posts: 8
Posts: 8
|
Post by ululu on Nov 25, 2021 14:44:16 GMT
Hello!
I am encountering the same problem, but I thing it might be related to the loading time for the songs.
I also use MA in the similar conditions, MA & PC in a bootstraper scene and loading the Sfx & Playlist on a scene by scene basis.
At first I was using the play on awake setting on the Playlist Controller, but I noticed that upon scene change it would have the exact same behavior as above.
An easy fix that worked for me was to call the StartPlaylist("PlaylistName") method manually in my scene initialization scripts.
In a scene with few audio to load, it works fine, but in ones that are a bit more content loaded, the music starts, then stutters for a while then continues playing. In my profiler I can also see a huge spike of GC allocation during the blank periods. But that might be very specific to my case!
Hope that helps!
|
|
ululu
New Member
Posts: 8
Posts: 8
|
Post by ululu on Nov 25, 2021 14:53:46 GMT
Edit: I found the reason of my huge performance spike while posting my previous answer.
My changes were :
1) Artifically extended our loading scene and delayed the call to start the Playlist for a few seconds after initializing the DynamicGroupCreator.
2) The call to StartPlaylist() was made twice for that playlist instead of once.
That's quite specific but if that can help in some way!
|
|
|
Post by DarkTonic Dev on Nov 25, 2021 18:12:45 GMT
Thanks for the info!
|
|