luniac
New Member
Posts: 11
Posts: 11
|
Post by luniac on Jun 12, 2015 21:51:48 GMT
When i play the game i keep getting nonstop debug calls from this: if (grp.curVariationSequence == MasterAudioGroup.VariationSequence.Randomized) { ArrayListUtil.SortIntArray(ref played); for (var i = 0; i < played.Count; i++) { Debug.Log(played ); }
if (lastIndexPlayed.HasValue && lastIndexPlayed.Value == played[0]) { // would be a repeat of the last random choice! exchange var firstIndex = played[0]; played.RemoveAt(0); played.Insert(UnityEngine.Random.Range(1, played.Count), firstIndex); } }
I just call this from my script: MasterAudio.PlaySoundAndForget("bullet_basic_shot", 1f, null, 0f, null);
This code never gave me any problems until i updated to 5.1.0 version and installed updated masteraudio version. That's when the debug.log started happening, commenting them out still kills the performance, i believe its the function itself.
UPDATE: even if i disbale loggin on master audio object, i still get debug logs. Also randomly changing fade settings seem to randomly make performance better even though the function still gets called. But it also randomly goes back to bad performance.
here's another screenshot, now it seems the logs are whats killing performance, weird
|
|
|
Post by DarkTonic Dev on Jun 12, 2015 22:23:39 GMT
Delete that loop. It was for testing. I must have accidentally left it in. I'll remove it for the next version.
Logging is a massive performance drain.
|
|
luniac
New Member
Posts: 11
Posts: 11
|
Post by luniac on Jun 12, 2015 22:35:10 GMT
Delete that loop. It was for testing. I must have accidentally left it in. I'll remove it for the next version. Logging is a massive performance drain. yes sir
|
|
|
Post by DarkTonic Dev on Jun 13, 2015 0:18:49 GMT
Thanks!
|
|