- Home /
Question by
numberkruncher · Apr 02, 2014 at 12:26 AM ·
editorupdate
EditorApplication.update way more frequent than 100 times per second?
According to the Unity documentation, EditorApplication.update
should occur approximately 100 times per second.
Though I am finding that it is occurring approximately 200 times per second with the following script:
[InitializeOnLoad]
class Test {
static Test() {
EditorApplication.update += OnUpdate;
}
private static int s_Counter = 0;
private static void OnUpdate() {
if (++s_Counter == 200) {
s_Counter = 0;
Debug.Log("Tick");
}
}
}
So it is clear that I will need to track the time between each update call to reduce the rate at which my update function does its thing. This is not an issue, I know exactly how to do this.
My question is this:
Is this update rate higher with faster CPUs?
Comment
I think it depends on editor framerate (AFAI$$anonymous$$ you can profile editor stuff too)
Best Answer
Answer by numberkruncher · May 31, 2014 at 12:23 PM
Unity have confirmed that this callback occurs more frequently than documented (Case 600361).