Search Issue Tracker
Fixed
Votes
1
Found in
4.5.0b6
Issue ID
600361
Regression
No
EditorApplication.Update frequency varies from too fast to too slow
To reproduce:
1. Create a new C# script and paste in:
using UnityEngine;
using UnityEditor;
using System.Collections;
[InitializeOnLoad]
class Test {
static Test() {
EditorApplication.update += OnUpdate;
}
private static int s_Counter = 0;
//private static float s_Tim = 0;
private static void OnUpdate() {
// s_Tim += Time.deltaTime;
if (++s_Counter == 200) {
s_Counter = 0;
Debug.Log("Tick");
//s_Tim = 0;
}
}
}
It prints out a tick after every 200 updates. After first looking into the console you should notice that it seems quite fast - a lot faster than the stated 100 updates per second in the documentation.
2. Uncomment the comments in the script and add + s_Tim.toString() to the debug log. The updates slow down
3. Enter play mode - you should notice that the time value is always the same (for me it was 4 seconds, which is half the speed in the documentation)
4. Comment the time counting parts again - the slow speed still remains
Basically there are some weird inconsistencies, most likely they are by design, but more accurate notes in the documentation would be nice
Comments (2)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- The Editor opens when the window is closed right after launch
- Frame Debugger's Hierarchy is not navigable when connecting it to the project built with the Volumetric Fog
- The number of SetPass Calls is increasing when attaching the Frame Debugger to the Player
- Scrollbar briefly appears in the Package Manager during installation process even when the package list is too short to require scrolling
- Script resets to use the previous Skybox color when saving the Scene changes
DonCornholio
Aug 03, 2022 13:53
In Unity 2021.3.2 this issue still persists !
awesomedata
Apr 02, 2018 13:33
We really need this fix for our Asset -- it relies on realtime input using the EditorApplication.update delegate -- PLEASE FIX THIS.