Open rafaeldolfe opened 2 years ago
@rafaeldolfe Can you provide a simple scene that reproduces the issue please?
So I made a new scene and added a bunch of sprites. (FYI: this is a new scene within a larger project)
All of these sprites have just a sprite renderer and a normal sprite on it.
I have a normal camera in the scene with an OutlineEffect attached to it.
The performance, unfortunately, is hitting back in edit mode. It spikes with a relatively consistent pattern where the OnGUI method seems to eat tons of CPU. I don't know why.
The outline effect itself is visible in the game view and looks great. Performance in play mode is also totally fine. It's just not playing nice with edit mode.
As the screenshot shows, no problems in play mode.
@cakeslice This outline is so great otherwise Q_Q Could you perhaps give me a hint as to what might be the problem?
I did a deep profile and found some interesting results.
It does like a lot of the spikes are from the ProfilerWindow (which is good in a way), but I do still get 6 ms in the SceneView and 4.5 ms in the GameView (OnGui the main culprit for both).
For some reason the outline spikes over and over in edit mode. I've found this out using the profiler. My scene has many, many sprites, but only a few of them have outlines. Playmode runs OK, but edit mode is slow. Profiler is reporting issues around/in SceneView drawing. (If I close the Scene tab, performance goes up significantly. Same with Game tab too though.)