Hi, next code below acts different on Android, while in Editor it acts as supposed:
private IEnumerator CountTo(int target)
{
yield return new WaitForSeconds(0.5f);
int start = 0;
do
{
ScoreText.text = string.Format(scoreText, start);
if (start != 0)
{
SoundManager.instance.Play(ScoreSound, default, 0.4f);
}
start++;
yield return new WaitForSeconds(0.33f);
}
while (start <= target);
}
In editor, when it called, it waits for 0.5 seconds before launch (to wait Complete level sound to play), counts to targetone by one with playing ScoreSound each time (except the first one) when score changes.
On Android it firsts plays all of the the needed ScoreSoundsounds and only then, SLOWLY changes the UI score. In debugger, step by step, everything works fine.
Any idea what can be causing this?
Thanks!
OK, guys, sorry, I figured it out, the answer is actually really stupid… So it turns out that this was happening because of the Post Processing Stack’s Depth of Field, it was activated during Level Complete phase and when the CountTo was called, so it seems that these two somehow interfered each other, so I’ve got what I’ve got.
Sorry again! Thanks!