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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by youyouzizi · Mar 10, 2015 at 02:33 PM · inputupdateframerate

higher frame-rate than update frame-rate

Update frame-rate is related to render, so it cann't be too high or there is no need. For some reason, I want my scripts to run at higher frame-rate, such as faster input, faster network message execution. InvokeRepeating and WaitForSeconds don't work. Maybe FixedUpdate can work? Is there a good way to do this?

Comment
Add comment · Show 3
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 tanoshimi · Mar 10, 2015 at 02:48 PM 0
Share

Why doesn't InvokeRepeating work? You can specify the interval you want (so long as your hardware can cope). Otherwise I'd just create a separate thread.

avatar image youyouzizi · Mar 11, 2015 at 03:23 AM 0
Share

I set Update frame-rate 50, InvokeRepeating frame-rate 100. Yes every frame Update runs once, InvokeRepeating runs exactly twice. But the problem is two InvokeRepeating run at the same time. For example, Update runs at 0ms, 20ms, 40ms... InvokeRepeating runs at 0ms, 0ms, 20ms, 20ms... And Even FixedUpdate is the same! I use Time.realtimeSinceStartup records time. Just in case I also use QueryPerformanceFrequency and QueryPerformanceCounter record time, but there is no diffrence. Is there anything I do wrong?

avatar image youyouzizi · Mar 11, 2015 at 03:51 AM 0
Share

http://forum.unity3d.com/threads/the-truth-about-fixedupdate.231637/ This page explains FixedUpdate. According to my test, InvokeRepeating is the same as FixedUpdate.

1 Reply

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

Answer by Kiwasi · Mar 11, 2015 at 04:05 AM

If you really need something to run at some defined frequency, you are better off setting up its own thread and implementing a timer using sleep. Pretty much all of Unities built in methods follow the same pattern. Run Update once, then call the methods as many times as it takes to catch up. Then repeat. Its not overly useful for genuine real time applications, like on the fly sound generation.

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 youyouzizi · Mar 13, 2015 at 03:51 AM 0
Share

I will have a try. Thanks very much!

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

input not working on high framerate 0 Answers

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

Is Update() NOT linked with graphics refresh rate? 3 Answers

How can I prevent Input.GetAxis from sporadically reporting deltas of 0.0? 0 Answers

Replay system for android, need help with precision (framerate problem) 1 Answer


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