|
Post by gegagome on Aug 4, 2016 7:40:32 GMT
Hi there My code worked fine like this: public void VoiceOverSlider (float value) { VoiceOverVolume = value; PersistentAudioSettings.SetGroupVolume("VoiceOvers", VoiceOverVolume); }
public void BackgroundSoundSlider (float value) { BackgroundVolume = value; PersistentAudioSettings.SetGroupVolume("Background", BackgroundVolume); PersistentAudioSettings.SetGroupVolume("Spawn", BackgroundVolume); PersistentAudioSettings.SetGroupVolume("Others", BackgroundVolume); } But I found out about buses and thought it would be simpler so after assigning buses in the editor I did this and now the buses won't update in the editor: public void VoiceOverSlider (float value) { VoiceOverVolume = value; PersistentAudioSettings.SetBusVolume("VoiceOvers", VoiceOverVolume); }
public void BackgroundSoundSlider (float value) { BackgroundVolume = value; PersistentAudioSettings.SetBusVolume("SFX", BackgroundVolume); } Before I start the scene the bus SFX is at volume 1f and the groups are also at 1f but when scene starts the group volume jumps to 0f while the bus remains at 1f. Any ideas what I could be doing wrong? Thanks Attachments:
|
|
|
Post by DarkTonic Dev on Aug 4, 2016 15:58:19 GMT
Sounds like your group volumes are still persistently set to 0 from your old code, which is behaving correctly, as you described. You won't be able to hear those groups. So you should reset all the persistent settings by clicking the "Reset Prefs / Settings" button on the Master Audio Manager window. This does reset a few other things as well at the same time. See the online docs for details so you can re-change any of those other few settings if you had them on.
Let me know if it works properly after that.
|
|
|
Post by gegagome on Aug 4, 2016 16:57:53 GMT
It did solve the problem I had. In my 5 minutes test I didn't notice anything strange. Later tonight I will fully test it but it worked!
Is this how you would have solved the same problem? With buses instead of groups?
Also, can I load resource files dynamically to load different voiceovers for 5 languages instead of the settings screen in my main menu?
Thanks
|
|
|
Post by DarkTonic Dev on Aug 4, 2016 19:25:15 GMT
Yes buses are good for this.
Have you read the localization page of the online docs?
It works if you change scenes after selecting the language. The next scene will load the selected language.
|
|
|
Post by gegagome on Aug 4, 2016 22:29:28 GMT
I was thinking languages changes in the same scene by simply changing languages so I guess no.
It is hard to tell whether parents or my young users would switch languages if they were in the same scene.
Thanks
|
|
|
Post by DarkTonic Dev on Aug 4, 2016 23:32:45 GMT
You have to reload the Scene then if you don't want to change Scenes. That may work, I haven't tested it. All the resource files are mapped to the correct language folder when the Scene loads or there would be no way to unload them properly when you change languages, and then you'd have a memory leak and crash the program...
|
|