thomas
New Member
Posts: 6
Posts: 6
|
Post by thomas on Jan 19, 2015 9:32:57 GMT
Hi and thanks for a really nice tool!
I have a very simple question. I'm currently working on the soundscape and ambience for our game Vane and i'm not really sure if i'm doing this as you intended. To play a sound i create an empty game object and attach a event sound script on it to play the sound. It's very cumbersome and i need to move the sound source from the audio group to the same position as the new game object i created to tweak the min/max distance of the sound. Is there perhaps an easier and faster way to do this?
I have a little feature request as well. I use snapshots heavily to switch between different atmospheric settings. Usually you would want volume transitions to be exponential (crossfade) instead of linear for the sound not to drop out during the transition. It'd be cool if you could choose which type (linear, smooth etc) the Unity 5 snapshot transition should use when choosing "transition to snapshot blend" from the event sounds script that would override any settings you have in the mixer! It's not a biggie, but it would be a great time saver.
Keep up the good work!
Cheers, Thomas
|
|
|
Post by DarkTonic Dev on Jan 19, 2015 17:29:36 GMT
I'm not sure why you would be "moving" the Audio Source, creating the empty game object or any of that...you could just be calling a method like MasterAudio.PlaySound3DFollowTransform. Why would there ever not be a game object at the location you want to make the sound? I'm not familiar with a scenario like that.
As far as tweaking the min/max distance of the sound, do you know what you want those to be up front? Because we added AudioSourceTemplates in the last version so you can easily change those in the Variations in bulk.
The transition to snapshot is a Unity API call. Is there another method for crossfade type? If not, we can't do it.
|
|
thomas
New Member
Posts: 6
Posts: 6
|
Post by thomas on Jan 21, 2015 7:13:42 GMT
Hey again, I'm sorry i wasn't very clear. I just want to place a static audio source in the scene. I need to be able to control the min/max distance per case/object since some things should be louder and audible farther away. Unity Audiosource to play the sound from one position: Master audio to play the sound from one position (?): These are the transition types i was talking about (right click volume for an example):
|
|
|
Post by DarkTonic Dev on Jan 21, 2015 7:31:28 GMT
Ok, then that is one fine way to do it (with EventSounds script start event). Note that if your Game Object "making" the sound isn't ever going to move, you don't need to use "Attach to Caller". You can use "Caller Location" instead, which doesn't ever check for position update so it's better performance when you have a lot of them going on. The picture you showed for transition types is interesting. I don't believe that there is a Unity API method that allows us to specify the transition type for that. Take a look yourself here: docs.unity3d.com/500/Documentation/ScriptReference/Audio.AudioMixer.TransitionToSnapshots.htmlIf you find something that lets us do it, let me know. It might be "UI only". As far as your original question: "It's very cumbersome and I need to move the sound source from the audio group to the same position as the new game object I created to tweak the min/max distance of the sound. Is there perhaps an easier and faster way to do this?" I think this would be faster: 1) Just create an Audio Source on the Empty Game Object, tweaking it there. 2) Copy the Audio Source component from there over top of the Audio Source in the Sound Group Variation(s) you want to play (and then delete the Audio Source on the empty game object). That's probably a little faster since you don't have to move things around twice.
|
|
thomas
New Member
Posts: 6
Posts: 6
|
Post by thomas on Jan 22, 2015 2:27:07 GMT
Ah thanks! Performance tips are always welcome. That's a good way to do it, but it's still a workaround I'll ask our coder to do something funky. We'll share it with you ofc. I'll look in to the snapshot mix as well. More info about that later.
|
|
|
Post by DarkTonic Dev on Jan 22, 2015 3:08:31 GMT
Yeah, in some cases, you don't save any steps to gain ultimate flexibility. Overall the power you get from the plugin is worth the occasional extra step I believe.
|
|