hagen
New Member
Posts: 8
Posts: 8
|
Post by hagen on Feb 6, 2015 20:55:42 GMT
Hi, The last two days I have had some serious issues with MM. Out the blue some of my sounds stopped working.
After debugging down to the MM code, I found that customEvent.LastFrameFired is loaded with a large value, so when I send the event to play the sound, I get a warning in the console with a statement like "...failed to play because can not be played again in the same frame" (I'm not on my dev PC so I'm writting on memory).
So I put a breakpoint and found that the LastFrameFired is loaded with a value of 2114, while my time.frame is way lower than that. So I could not fire the sound until some long time elapases in the game, then MM would play the sound.
The 2114 value is constant across multipe debug sessions.
|
|
|
Post by DarkTonic Dev on Feb 6, 2015 23:49:38 GMT
The Custom Event is only ever set to Time.frameCount, and in only one piece of code. I'm betting you have turned on "Save Runtime changes"? I was able to reproduce this bug when that's on. I'll fix this bug in the next release if so. If there's a different way you are reproducing it, let me know.
Adding the following code to the end of Awake() method in MasterAudio.cs fixed it for me:
for (var i = 0; i < customEvents.Count; i++) { customEvents[i].frameLastFired = -1; // to reset it for people who use "Save runtime changes". }
|
|
hagen
New Member
Posts: 8
Posts: 8
|
Post by hagen on Feb 7, 2015 5:22:27 GMT
thanks, at some point I was working with the "Save Runtime changes" I did thought that was the problem, but as you mentioned there is only one point int the code where frameLastFired is updated. But your fix has addressed my problem. Thanks!
|
|
|
Post by DarkTonic Dev on Feb 7, 2015 8:39:53 GMT
No problem. By the way, your guitar looks kind of like mine I don't mean the one in my avatar, but my main guitar. Check it out at www.brianhunsaker.net if you're curious.
|
|
hagen
New Member
Posts: 8
Posts: 8
|
Post by hagen on Feb 24, 2015 3:23:30 GMT
No problem. By the way, your guitar looks kind of like mine I don't mean the one in my avatar, but my main guitar. Check it out at www.brianhunsaker.net if you're curious. It's a Schecter C1+ custom custom, the second custom comes from me, as I changed the original pickups for a new pair of Seymour Duncan SH11 and TB
|
|
|
Post by DarkTonic Dev on Feb 24, 2015 3:57:38 GMT
Niiice! Keep on keeping on
|
|