Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Alex_May · Oct 06, 2015 at 06:12 PM · editortimeeditorwindowupdate functiondeltatime

EditorWindow update Time.deltaTime is 1x10^-5?

In the docs, it says EditorWindow.Update is called 100 times a second.

When I call Time.deltaTime from my editor window update, I get 1x10^-5. That's 1000 times smaller than I'd expect.

But here's the thing, when I use 0.01f for the time, it's too fast. The actual value is closer to 0.005, or about 200 times a second.

What gives? Something I've done wrong? Nobody else is having this issue? It's a frame-based animation editor so I need the time to be reasonably accurate.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by Bunny83 · Oct 19, 2015 at 02:43 PM

Time.deltaTime was never ment to be used in editor code. It's a pure runtime value. In the editor it returns a constant value of 10^-5 as you already mentioned.

However i can confirm that EditorWindow.Update as well as the generic EditorApplication.update delegate now seem to run at 200 calls per second. I know for sure (99.9%) that it actually was 100 in the past. So either they have changed it but haven't adjusted the documentation or they have changed it accidentally during some kind of refactoring ^^. Either way it's not consistent accrding to the documentation.

So feel free to post a bug report in Unity. I will do as well. However i'm still not sure under which category, "documentation" or "Unity editor" :). I think "Unity editor" will be better as the documentation is what we expect, even when it's actually the documentation that might be outdated.

edit
I also just dicovered that the callrate changes to the games FPS rate when you are in playmode. So with the usual vsync and 60Hz monitor i get 60 calls per second in playmode and 200 in edit mode. That not necessarily is a bug, but it would be nice if it would be mentioned in the docs.

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

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

Related Questions

Different behavior between editor and standalone changing time step 0 Answers

Editor: Drawing outside the own window 0 Answers

Multiple editor windows combined 0 Answers

Reflection on class variable values null on editor startup 0 Answers

Listen to Keyboard Events on EditorWindow 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