This will avoid repainting the editor per GUI frame, but will also make the visual debugging less “responsive”. Maybe that works for you though Let me know.
The responsiveness is hurt too much to my liking, though performance problems are completely gone. But you gave me an idea to just make it skip a certain number of OnGUI calls before every Repaint, like this:
1
2
3
4
5
6
7
framesSinceUpdatedGUI++;
if(rootGraph.isRunning&&framesSinceUpdatedGUI>=2)
{
framesSinceUpdatedGUI=0;
Repaint();
}
(Left willRepaint || e.type == EventType.MouseMove intact in a separate “if” statement)
Here I got another problem: repainting every 2nd frame is still a bit taxing; every 3rd frame has almost the same effect as removing rootGraph.isRunning like you suggested. I’m trying to link it to Time.deltaTime but still can’t figure out how to reach that middle ground. The red dots are either lagging very hard or move butter smooth.
Anyways, skipping every second frame is decent already. Unless you have an idea, I’ll settle on that. Thanks.
Login
Register
By registering on this website you agree to our Privacy Policy.