|
Post by terrymorgan on Feb 23, 2015 16:07:16 GMT
I just heard about this last week, really a hidden gem, I did a tut on item pickup noises here sites.google.com/site/terrymorgan1213/tutorials/master_audio_get_startI read the manual about replacing audiosource with master audio page 47 'Then you are free to import Master Audio and start doing sound design, first configuring the sounds that the tool removed.' It found 31 in the hierarchy, almost all enemies with this aisetc.cs, there's a 'hurt' and and an 'attack' sound I use locate32 (free) to find text in files. if(hurtVoice && GetComponent<StatusC>().health >= 1){ audio.clip = hurtVoice; audio.Play(); My question is, what's the master audio version of audio.Play? 3 more- I also have a looping ambient sound on my player, nature sounds, etc. Is there a better way to do this? I'd like variations on it. Suppose I have a waterfall, animated machine, etc, I want to play a sound for, how to do this in Master Audio? Do sounds loaded as a Resource have to be in Assets/Resource folder?
|
|
|
Post by DarkTonic Dev on Feb 23, 2015 17:52:48 GMT
The equivalent of audio.Play is MasterAudio.PlaySound3DAndForgot. There are many variants - they all start with "PlaySound".
Ambient sounds can be played by putting an EventSounds component on the game object with the location of the ambient, then using the Start event to play a Sound Group. The Sound Group can have variations of course.
Resource files have to be in a folder called "Resources". The folder can be located anywhere.
|
|