|
Post by danosono on Jun 6, 2023 19:51:05 GMT
I have a toggle group whereby the player chooses a playlist.
Any harm in creating playlist on a Dynamic Sound Group (but NOT add any songs), name it "none" and calling MasterAudio.ChangePlaylistByName("none", false); ?
This toggle will persist just like any of the other playlists.
I tested it and it works and there are no errors; just wanted to mention it here so I can be informed of any potential problems or better solutions.
![]() Thanks 
|
|
|
Post by DarkTonic Dev on Jun 6, 2023 20:15:40 GMT
What does it do when you call that code? I'm confused by your scenario.
Thanks, -Brian
|
|
|
Post by danosono on Jun 6, 2023 20:26:01 GMT
It sets the playlist to the playlist named "none" ; when the game starts, there is no music (usually there is when a populated playlist is active).
When I create a new playlist and name it "none" , I just don't add any songs.
|
|
|
Post by DarkTonic Dev on Jun 6, 2023 20:30:10 GMT
Ok. I haven't gathered why you need to do that though. Can't you just Stop the Playlists, or not play a song?
|
|
|
Post by danosono on Jun 6, 2023 21:02:34 GMT
Sorry Columbo (or should I say Socrates)
You got me to thinking, lol
I have an EventSounds.cs on the parent gameobject of the gameplay level and this has two actions: 1) FadeOutAllOfSound (to stop menu song) and 2) PlaylistControl > Play Random Song (to play a random song from the set playlist)
So I can't just stop the playlist because it would only stop it once and I want the toggle / bool to be set so the player can go without playlist music indefinitely between gameplay sessions.
I will need to call the playlist via script and then I could check the bool. I don't see a bool-check on EventSounds.
Thanks for helping me think through this; more educational.
|
|
|
Post by DarkTonic Dev on Jun 7, 2023 2:29:27 GMT
Yeah we don't have any bool. If you need state, you'll need to call some of the API's yourself or think of workarounds like that.
Thanks!
|
|
|
Post by danosono on Jun 7, 2023 12:47:26 GMT
Thank you sir!
|
|
|
Post by DarkTonic Dev on Jun 7, 2023 13:33:26 GMT
Any time.
|
|