|
Post by Skizooo on Jun 24, 2021 6:12:40 GMT
Tried with 1 & 2 Playlist Controllers, using both overload methods. The StartPlaylist methods fade in like expected but then StopPlaylist just cuts. Doesn't make sense to me.
|
|
|
Post by DarkTonic Dev on Jun 25, 2021 5:18:56 GMT
The Start fades in because there's a Fade In First Song checkbox that you probably have checked. The other checkbox "Fade Out Last Song" is only for "natural endings", in order words when the last song finishes playing by itself. It doesn't do anything as far as ending a song early by Stop command.
The easy way to remember it is: "stop" means stop, and not fade. There is also a FadeToVolume command on the Playlist Controller if that's what you want to do.
If you would like me to add a disclaimer to the documentation about the Fade Out Last Song checkbox not working for "Stop", I can do that. Let me know where I can fix the docs.
-Brian
|
|
|
Post by Skizooo on Jun 25, 2021 9:02:54 GMT
|
|
|
Post by DarkTonic Dev on Jun 25, 2021 15:39:24 GMT
Ah good catch - I have no idea why it says that in the docs, it's never worked that way. I will update the text today.
Yes, the volume change is permanent. However there is an optional callback you can pass in as the last parameter for FadeToVolume, where you can do whatever you like after the fade finishes, such as reset the volume to its previous value.
PlaylistController.InstanceByName("YourPlaylistControllerName").FadeToVolume(0f, 2f, delegate { // add code to reset volume back to whatever. });
-Brian
|
|
|
Post by Skizooo on Jun 26, 2021 0:37:33 GMT
Awesome, thank you!
|
|
|
Post by DarkTonic Dev on Jun 26, 2021 4:48:26 GMT
My pleasure, enjoy!
|
|