Hi all,
I’m in the process of converting my android game to iOS, but for some reason (which I think I might know the reason behind) it’s much slower on iOS devices. A few things I’ve gathered from the forums and some general info…
- iOS forces v-sync, so anything that’s frame-rate dependent could slow down
- I don’t have Application.targetFrameRate set, though it seems some recommend it?
- I tried “Every v-blank” in the settings
- Android version runs between 100-200 FPS
The slow animation in question is called by a coroutine that steps through to the target rotation/position…
IEnumerator DoRoll(Vector3 myPivot, Vector3 aAxis, float aAngle, float aDuration) {
aPoint = myPivot;
tSteps = Mathf.Ceil(aDuration * 60.0f);
tAngle = aAngle / tSteps;
for(var i=1; i<=tSteps; i++) {
transform.RotateAround (aPoint, aAxis, tAngle);
yield return new WaitForSeconds(.01f);
}
Now, my assumption is that I need to instead put this in some kind of time.deltatime loop rather than the fixed coroutine?
The other possibility is forcing 60fps, is that possible with Application.targetframerate? If so, what do I set the vsync setting to?
Thanks for any input/advice. I might be able to show some profiler info later but I’m at work at the moment.