This page details optimizations which are unique to iOS deployment.
Most of the functions in the UnityEngine namespace are implemented in C/C++. Calling a C/C++ function from a Mono script involves a performance overhead, so you can save to save about 1 to 4 milliseconds per frame using iOS Script Call optimization.
To access iOS Script Call optimization, navigate to the Player Settings window (menu: Edit > Project Settings > Player) and select the iOS icon (shown below).
Locate the Script Call Optimization* setting in the _Other Settings section.
The options for this setting are:-
Unity iOS 允许您更改应用程序尝试执行其渲染循环的频率;默认情况下,此频率设置为 30 帧/秒。降低此数字可以节省电池电量,但当然这种节省将以减少帧更新为代价。相反,也可以增加帧率,使渲染优先于其他活动(如触摸输入和加速度计处理)。您需要尝试选择不同的帧率来确定帧率在具体情况下对游戏运行过程的影响。
例如,如果应用程序涉及繁重的计算或渲染,但只能维持 15 帧/秒的帧率,那么将所需的帧率设置为高于 15 将不会带来任何额外的性能。必须充分优化应用程序来支持更高的帧率。
To set the desired framerate, change Application.targetFrameRate.
If accelerometer input is processed too frequently then the overall performance of your game may suffer as a result. By default, a Unity iOS application will sample the accelerometer 60 times per second. You may see some performance benefit by reducing the accelerometer sampling frequency and it can even be set to zero for games that don’t use accelerometer input. You can change the accelerometer frequency from the Other Settings panel in the iOS Player Settings.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.