I'm using a simple script to replace the windows cursor with a custom one. However, before turning the windows cursor off, I noticed that my cursor lags behind it when I move the mouse. It's not gamebreaking, but it's annoying.
I doubt it's related to performance considering I'm testing this on a scene that only contains a Camera (with this script attached, of course).
Is this one of those things that are hard-coded into the engine or is there an alternative method that yields no lag?
The OnGUI() function is known to be slow. Unity 3.5 will hopefully have an improved GUI system.
But, I do not think it is the slowness of this function that is causing the issue.
I do think that it is a performance issue but not what you are thinking of. The
Of course, when you hide the Windows cursor, the lag would barely become noticeable.
answered Dec 07 '11 at 11:59 PM
After checking you Cursor position code, i'd say you better use Update() to update cursor postion and OnGUI() only to display it. That way you delete the lag caused by OnGUI calls.
answered Dec 08 '11 at 09:38 AM