Unity Profiler Area Charts

Any one know how the Unity profiler area charts are created? Are they creating meshes in script from vertices and then fill in the polygons?

We used the function ScreenToWorldPoint on a triangle that stretches from (0,0) to the Width and Height of the Screen and it renders the triangle but much smaller than screen. The only way to make it work for us is to position its z-index infinity away from the camera to get it to show.

Any thoughts would be greatly appreciated.

Best,
Chris

I think they are using GL. That’s what we use for the curve editor in our tool.

GL definitely looks like a good start, but my only concern is filling in the areas of the n-gon that we create using GL. We know we can do this using System.Drawing on the server side, but that is probably not the best solution.