OnMouseOver on LateUpdate

Hi, I’ve been trying to implement a pause menu by using Time.timeScale = 0.0f. The only problem is that I can’t make the buttons work since the OnMouseOver function works in simple Update and not in LateUpdate which still works when the time scale is 0. I’ve tried to find a solution, but all that Physics.Raycast crap doesn’t work for me - it either does nothing or doesn’t really detect collision and pressing the LMB anywhere does the thing. Any guesses?

Good day.

You can activate methods when pressing a button by its event system via inspector.


This do not use time, so you can still do it.