- Home /
Smooth out choppy Profiler feedback?
Hi folks, I'm hoping I don't have to download fraps to properly explain my issue here. I don't think anything is broken, per-se, but the Profiler window is acting funny and it has begun to inhibit me.
Right now, when I run my game in the editor and open up the Profiler, it updates with all of the info (as it should), but the info comes in at what I can only describe as a 10fps, jagged, feed. I thought this was normal until I realized that changing the window size, dragging the window, or even CLICKING on the window (rapidly) smooths out the feedback coming in to a much smoother 60+ fps. The readout looks beautiful and fluid, up until I've stopped actively clicking or moving it around.
What's going on?
So, as more people are viewing this question I wish to ask: Is anyone else experiencing/has experienced this?
Answer by Bunny83 · Apr 09, 2013 at 02:41 PM
I'm pretty sure they update the profiler window at 2 fps on purpose. Redrawing the profiler eats a lot cpu power, which would probably affect the results quite a bit. Of course when you create additional GUI events like clicking / resizing it forces a redraw of the window. This is the same behaviour you can see in a lot native windows applications.
I'm a bit confused why this is important? You usually stop the game at some point when you want to inspect something. It isn't ment to "look beautiful" ;) It's only important to have correct values.
I began to realize this as I watched videos of others using the profiler. I also learned about window redrawing $$anonymous$$utes before you posted. You're right, it isn't incredibly important, but I'm a very visual person and when all of the bumps start looking the same and are moving in that jagged fashion, it seems very sporadic to me and can be difficult to visualize where certain events are happening.
In a perfect world, I guess...
Answer by kristoof · Aug 04, 2017 at 05:24 PM
I know this is an old question but i always wanted to do this
using UnityEditor;
using UnityEngine;
[CustomEditor (typeof(Repaint))]
public class repMe:Editor {
void OnEnable() { EditorApplication.update += Update; }
void OnDisable() { EditorApplication.update -= Update; }
EditorWindow profiler;
void Update()
{
if(!profiler){
Searching();
}else{
profiler.Repaint();
}
}
void Searching(){
if(EditorWindow.focusedWindow.ToString()==" (UnityEditor.ProfilerWindow)"){
if(!profiler){
profiler=EditorWindow.focusedWindow;
}
}else{
Debug.Log(" pls select the profiler");
}
}
}
its a bit hacky but its beautiful :D
Your answer