- Home /
EventSystem.Update() lag spike in profiler on first call
From what I have read, the EventSystem only loads on the first call. Is there a way to load it during the splash screen so I do not have a stutter on the first tap/click? Cheers.
Not sure how it works exactly, but here is a stupid idea. If the first call is slow, make all the meaningful calls starting from the second. $$anonymous$$ake first flush call with an empty listener.
Answer by roointan · Feb 16, 2020 at 12:04 PM
In my case, it was a call to DateTime.Now somewhere deep in the methods that was slow! take a look at this: https://issuetracker.unity3d.com/issues/ios-il2cpp-system-dot-datetime-dot-now-is-slow-on-the-first-run I replaced the code with Time.time and it's fixed now.
Your answer
Follow this Question
Related Questions
Unity 4.6 Game lags on only on the first touch, after it is fine? 1 Answer
Optimizing script to improve lag 1 Answer
touch control code optimization 1 Answer
Shader.Parse over 1000ms 0 Answers
Touch Lag With S2 1 Answer