davoodoochief
New Member
Posts: 14
Creating Indie game in Unity3D www.sorcerygames.com and I regularly blog at http://sorcerygames.blog
Posts: 14
|
Post by davoodoochief on May 15, 2016 16:23:15 GMT
Hi,
I have a single group sound effect, I just dropped it into the group creator and set it to 2D always.
I then created a uGUI Button Click event on my object and it always plays the sound first time I click the button. However subsequent times it is random whether or not this will play the SFX (I would guess 1 in 4).
I also tried this with several other custom event and it has the same behavior. I am sure something simple is done incorrectly, but I cannot find it.
I am hoping you can suggest something that would cause this issue..
Thanks Da Voodoochief
|
|
|
Post by DarkTonic Dev on May 15, 2016 18:20:22 GMT
My guess is you only assigned 1 Voice to the SFX and it's busy the other 3 times you try to play it. Increase the Voices (Weight) field of the Variation to 4 and see if that fixes it.
Also, turn on Log Sounds in Advanced Settings and it will log to the Console to tell you why it didn't work (busy, etc)
|
|
davoodoochief
New Member
Posts: 14
Creating Indie game in Unity3D www.sorcerygames.com and I regularly blog at http://sorcerygames.blog
Posts: 14
|
Post by davoodoochief on May 15, 2016 21:35:10 GMT
Hi Dev, Thank you for a great response as usual. I did up the number of voices to 4 and now I get it to play a lot more. I also turned on the console tracking (debug log) and reading it brings up some questions for me. I have looked through the docs, but cannot seem to find the answers I am looking for. That image above shows the report I get while clicking the button in my game. Oddly it appears to reference values that are outside the 4 voices range (like the 4, 5 and 6). If these are indices then I am confused as to why it want to go this high as the SFX I am using is very small and I clicked the button quite slowly. Secondly the 'silence' child that is mentioned is also confusing as although I have not set this up, I did not realize it was required or used unless I want to stop a SFX playing etc. Could you clarify, or link me the help page for this item? Thanks Da Voodoochief
|
|
davoodoochief
New Member
Posts: 14
Creating Indie game in Unity3D www.sorcerygames.com and I regularly blog at http://sorcerygames.blog
Posts: 14
|
Post by davoodoochief on May 15, 2016 21:41:41 GMT
Hi Dev,
I just got to playing with this and that 'Silence' line still confused me, so looking at my sound group I realized that silence is part of it. so I deleted it.. and now my SFX plays every time!!!
I will take more notice of this now. I appear to be all good until my next issue, which hopefully won't disturb you soon.
Thanks very much again for your awesome support. Da Voodoochief
|
|
|
Post by DarkTonic Dev on May 15, 2016 23:00:15 GMT
If you have "silence" then you used a Sound Group template such as "25% chance play" when you created the group. I would go select a different one, it is right above where you drag clips in on the mixer.
|
|