Hello All,
I am playing around little with new UI system in Unity3D and trying to find out how it behaves on Android.
In overall I am really impressed with performance level achieved by the Team, but I was able to introduce stuttering by inserting only few elements on scene.
The goal I am trying to get is muti-timer:
So, blue thing is one timer and red thing is second timer.
Both timers represents of course different amount of time so animates with different speed.
With new UI I was able to achieve above thing by using three Images which are lying one on another.
Red and Blue Images are Type=Filled and in Update or Coroutine (tested both) I am changing fillAmount property. Black Image is simple Image with no actions on it. It’s more like background.
This “Image combination” fills up around 60-70% of whole screen.
On the screen there is also one small Image (dot) flying around in front of the timer. (on whole screen) Thanks to that I am checking how smooth all works.
I am moving small dot in Update by applying Translate.
In Editor all works smoothly.
But on Android device (Samsung Galaxy Tab2, Galaxy Mini2) there is stuttering. I mean my small reference dot is not moving smoothly but jumps like there were some lags.
Only on Galaxy S2 everything works ok all the time.
When one of the timers is ending round, so fillAmount goes to 0 then dot starts to move more smoothly.
Also when I disable one of timers (setActive = false) then it runs ok on all my test devices.
All of sprites used here are circles so I am aware that there are many transparent pixels around and this for sure has influence on performance. But I did also test when there was solid color in background and there was no difference. Stuttering was still there. So it looks like transparency is not a problem.
My question. Is my approach reasonable and good?
Are there some found issues with overlapping of UI elements?
I am working on Unity3D free, so I don’t have access to Profiler. Unfortunately.
Thanks for help!