Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by instruct9r · Sep 15, 2014 at 08:15 PM · iosfpslimitframe

targetFrameRate & vSync for iOS

Heya folks..

I was wondering, does Application.targetFrameRate, works on iOS? In the docs it says:

If vsync is set in quality setting, the target framerate is ignored, and the vblank interval is used instead. The vBlankCount property on qualitysettings can be used to limit the framerate to half of the screens refresh rate (60 fps screen can be limited to 30 fps by setting vBlankCount to 2)

And in the Unity Answers i read, that vsync is allways ON, for iOS and cannot be turned off....

The interesting thing is if i turn it Off and set targetFrameRate to 30, the game runs on exactly 30FPS (Where it was running with 50FPS, before that).

SO what's right and what's wrong?

Can i turn Off vSync for iOS? If no, then this means that targetFrameRate is useless? If so, how can i tell the game to run at specific frame rate? That was the first question.

Shoud i limit the FPS, by setting the VSync Count to "Every Second VBlank" ?

Second one: My game runs on iPad4, iPhone5 with 50, 60 FPS, and on iPad Mini, iPod touch with 30, 45 FPS. Shoud i limit the game to 30FPS, or i shoud leave it to decide by it's own, on what FPS to run. Apparently the Unity engine is doing some stuff behind, cuz if i don't limit it the game runs pretty well...

thanks

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by Eric5h5 · Oct 08, 2014 at 12:53 AM

iOS devices are always vsynced and that can't be changed. By default the framerate is capped at 30; you can use Application.targetFrameRate to change it to 60.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image instruct9r · Oct 08, 2014 at 09:51 PM 1
Share

Then coud you explain this please:

If vsync is set in quality setting, the target framerate is ignored, and the vblank interval is used ins$$anonymous$$d. The vBlankCount property on qualitysettings can be used to limit the framerate to half of the screens refresh rate (60 fps screen can be limited to 30 fps by setting vBlankCount to 2)

avatar image Eric5h5 · Oct 08, 2014 at 11:16 PM 0
Share

The docs aren't talking about iOS, they're talking about standard PC builds.

avatar image instruct9r · Oct 09, 2014 at 12:48 AM 0
Share

i see, that makes sence...

thanks

avatar image
0

Answer by bererton · Oct 07, 2014 at 07:36 PM

Hi instruct9r,

I was running into some of this today myself. My experience with Unity Beta 4.6b18 is that setting Application.targetFrameRate does indeed work on the iPhone. At least it worked for me if I set it to 60. Without setting that I was unable to change the frame rate to be higher than 30fps on iPhone 5/ or 6. Other threads have commented that vsync with Unity can be problematic sometimes (which for me seems to lead to jerky motion just moving a sprite around in a 2D game).

In terms of choosing a frame rate I think if it can run faster, why not let it run faster. As long as your game is frame rate independent it should be fine, assuming of course you don't have random frames with huge times here and there causing rough/jerky frame rate.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image instruct9r · Oct 08, 2014 at 12:44 AM 0
Share

hmm Yes $$anonymous$$aybe. Allthough for now i am limiting to 30, cuz as far as i understand 50, 60 FPS, is going to suck the battery of the device prettty quickly, especially for 3D graphics (Like in my case).

Are you manually turning Off vSync before building for iOS or you are leavint it on... I also noticed, that the targetFrameRate works, just fine.

avatar image
0

Answer by IgorAherne · May 31, 2018 at 02:39 AM

Also, would like to point this out (post #7) https://forum.unity.com/threads/device-present-in-profiler-what-the-deal.86312/#post-564383

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

26 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Why target frame rate either 60 or 30, how about 50? 3 Answers

Android/IOS First Person Shooter 2 Answers

IOS Gun shooting script 1 Answer

iPad 3 is at 1 fps while even iPad 2 is running above 10fps 0 Answers

Reduce battery consumption as much as possible 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges