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 robinking · Jan 13, 2011 at 10:55 AM · updateframeraterefresh

Is Update() NOT linked with graphics refresh rate?

var counter : float; var elapsed : float; var fps : float;

function Update() { elapsed = Time.time; counter++; fps = counter/elapsed; }

When running the above code in the editor, the Stats popout reported ~1600fps, while fps settled at roughly ~80. I always thought Update() was called once per frame? Or is graphics refresh independent of the code loop?

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
3
Best Answer

Answer by Peter G · Jan 13, 2011 at 11:05 AM

Everything is in one loop. The FPS display in the editor only displays FPS based on rendertimes so it is not an accurate representation of your games FPS. Rendering is only done once per frame.

Comment
Add comment · Show 2 · 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 robinking · Jan 13, 2011 at 11:31 AM 0
Share

Great, thanks for that. Good to know.

avatar image Herman-Tulleken · Jan 13, 2011 at 12:09 PM 0
Share

If I put another, independent test in OnPostRender, I get different results for the two measurements, sometimes - especially on mobile devices - significantly different. Am I missing something here?

avatar image
1

Answer by Andronikus · Jan 13, 2011 at 11:05 AM

Frames per second are not independent, they are inclusive of the code. The processor/GPU still have to calculate out the scene of which includes the Update Function and the code it contains. How quickly this calculation resolves per second is your frames per second in game.

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
avatar image
1

Answer by Eric5h5 · Jan 13, 2011 at 11:20 AM

Use this for measuring framerate: http://www.unifycommunity.com/wiki/index.php?title=FramesPerSecond. Update is called once every frame.

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 robinking · Jan 13, 2011 at 11:32 AM 0
Share

Thanks for the link - ah, so my game ISN'T running at 1600fps? ;-)

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

No one has followed this question yet.

Related Questions

Lagspike when using instantiate in coorutine 0 Answers

Time.deltaTime does not always correctly display the time difference between 2 frames 1 Answer

Frame dependant game. Using update vs fixed update. 3 Answers

Stuck on first frame on WP8 0 Answers

input not working on high framerate 0 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