|
Post by subtletechnology on Sept 28, 2021 2:01:03 GMT
Pretty simple, trying to create a fade-in and added a sound group with one audio clip and wanted two actions:
first one, Play Sound second one, Fade Volume To
For PlaySound, set the volume to -90 for the second action, Fade to 0 volume
Sound does not play.
plays fine if i delete the second action and leave the first one at a normal volume.
|
|
|
Post by DarkTonic Dev on Sept 28, 2021 4:13:44 GMT
I'm betting you may have set the sound volume to zero, which doesn't work with certain fades because multiplying zero times anything is zero.
It would be better if you show me the Inspector instead of describing what you have set up. Then I can advise. I will explain the math used and how to do it properly.
-Brian
|
|
|
Post by subtletechnology on Sept 29, 2021 9:05:20 GMT
I see what you mean, but just it is just two actions - all defaults nothing special at all other than it being addressables. Add an Event Sounds for a Custom Event: The first action is Play Sound, with Volume (db) -90. The second action is Fade In Volume to 0.
The custom event etc is not relevant - like I said it is working if you delete the second action and not use Volume (db) -90 on the first action. Merely removing the second action and leaving Volume (db) at 0 in the first one (correct setting to play at full sound) then it works fine - but I want it to fade in and that is what I am trying to achieve with the two actions.
So if you can describe how to do a Fade In when playing a sound group, that is all I am trying to do. Nothing special, drag a sound so it makes a sound group and play it - but it should Fade In over a second or two and not start at full volume.
|
|
|
Post by DarkTonic Dev on Sept 29, 2021 19:34:37 GMT
Do you mean action #2 is Group Control / Fade To Volume? Yeah that's not going to work. You're playing your Sound Group with Variation Volume at zero. Fade Group To Volume only adjusts the Group Volume.
The actual volume of the Audio Source is always: (Variation Volume) times (Group Volume) times (Bus Volume if assigned to a Bus) times (Master Mixer Volume). If any of those are zero, the multiplication result is obviously zero. You are using decibels scale so you won't see zeroes, but I'm talking the Unity default audio volume scale here.
I would say the easiest way to do what you want is to not use Event Sounds for the fade. Build a Variation with the fade already there. Under the Variation in the Sound Group, check the "Custom Fading" checkbox and specify the fade there. If you ever need to play that same sound without a fade, you'd need a separate Variation without the Custom Fade.
-B
|
|
|
Post by subtletechnology on Oct 1, 2021 11:47:33 GMT
ok great i will try that thanks
|
|
|
Post by DarkTonic Dev on Oct 1, 2021 16:36:07 GMT
No problem.
|
|