简体   繁体   中英

Unity game lag when test on iOS devices

I recently create a small puzzle game in Unity , just a simple one, not fancy effect or anything. It really smooth when I test run on Unity .

在此处输入图片说明

FPS normally cap at 200 and on the largest resolution its around 80 - 120 FPS - super smooth. After that, I build an iOS version and test on ios device, it's quite laggy. I tested on iPhone 6+, iPhone X, iPad 9.5 inches, and the outcome still the same, its a little bit lag. Maybe be I need to adjust some graphics settings on Unity ? Please I need some advice from you guys. Thanks for reading.

You can try a few things.

  • At the very beginning of your app, keep a target frame rate to 30.

Application.targetFrameRate = 30;

  • Downgrade quality settings to medium. Within that, also disable or dull down things related to lighting in case yours is a simple 2D game.

  • Optimize art. Pack art in packing tags, and on iOS, keep their compression at PVRTC. Only the ones looking really bad after compression should be RGB24 or RGBA32. Disable options like Generate Physics shape(if you're not using that), and Generate mipmaps.

  • Have a look at your UI. Anything in UI that is not interactive(like simple images, or texts, which are not buttons or input texts, etc) should have Raycasting off. The Rich Text option in texts too should be off if that is not affecting your app specifically.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM