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
- Reflection Problem custom Cubemap loses its reference when HDR is enabled and the platform is switched
- [macOS] "Add Component" button is broken when the Editor is moved to a different MacOS workspace
- Player settings icons are not retrieved when using "PlayerSettings.GetIcons" method on PS4, PS5, Xbox
- Changes of MaterialPropertyBlock via Script reset when Sprite Renderer.Color is changed in animation
- Frame Debugger flickers when a Shader Graph Window is open
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.