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
0
Question by ripol · Mar 27, 2013 at 08:49 PM · fpskeyframecpu

Is it possible to get the value of waitForTargetFPS?

Hi there,

I was trying to don't waste CPU at each frame, so I was thinking to watch the value of waitForTargetFPS until it gets close to 0% to know if I can continue using the CPU in that frame. Or is there another way to do that?

thank you in advance

rp

Comment
Add comment · Show 1
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 ripol · Apr 01, 2013 at 10:38 PM 0
Share

Nobody????

BU$$anonymous$$P!!!

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Eric5h5 · Apr 01, 2013 at 10:49 PM

WaitForTargetFPS is not anything that's available in scripting, but it's not necessary and you don't need to do anything. It sounds like you have vsync on, so Unity doesn't do anything but wait until it's able to draw the next frame anyway.

Comment
Add comment · Show 4 · 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 ripol · Apr 01, 2013 at 10:59 PM 0
Share

Ok, but there is a way to know if I can continue using the CPU to compute some data before to pass to the next frame so I can still getting 60 fps?

avatar image McDev02 · Oct 18, 2013 at 08:36 AM 0
Share

Why would you want to do that? Be happy that your scripts are fast/simple enought that they work fine. If you want to calculate other things just do it. Write a sudoku solver in a coroutine which Unity can play with until the frame is done, if you fear Unity can be bored to much.

avatar image jashan · Jul 03, 2015 at 04:07 PM 0
Share

Actually this would be quite useful to have from scripting because when you have VSync on, there's no way to actually measure how much room you still have (except if you use the profiler, of course).

avatar image McDev02 · Jul 03, 2015 at 04:51 PM 0
Share

Well it seems I didn't understand the question at the point writing the comment. To answer the question for possible alternatives: $$anonymous$$ultithreading. I think that this a use-case for that.

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

12 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

Related Questions

What's better? Managers using DontDestroyOnLoad or keep one in each scene? 1 Answer

CPU usage, fps and colliders 0 Answers

GameObject.FindGameObjectsWithTag - How CPU Intensive is it (iOS)? 1 Answer

free models, guns ? 0 Answers

Low FPS with no shown reason 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