render-timing-for-unity
render-timing-for-unity copied to clipboard
a question
every frame the script call startevent and endevent, that mean every frame we store a time that GPU use in buffer,but we get the time just every second, we may lost lots of frames time and what we get is the latest frame. if this project just want to get one frame time that GPU use,i think you should use bigger buffer to store, i suggest we get one second GPU use time, every startevent,we add the before time, when call gettimeEvent,return the total time and reset it.
RenderTiming.instance.deltaTime is updated every frame. It's your application's decision how to use it.
Logging once per second is meant as an example and can be disabled.