-->

分類

2017年7月11日 星期二

[Note] Unity Profiler enhancement

split binary profiler data (in order to view more frames in profiler):
http://www.itdadao.com/articles/c19a766424p0.html

calculate FPS:
https://github.com/MattRix/UnityDecompiled/blob/master/UnityEditor/UnityEditor/GameViewGUI.cs
http://www.jianshu.com/p/1c22321d88af
https://gamedev.stackexchange.com/questions/118934/unity-stats-framerate-vs-time-deltatime
note about FPS calculation:
1. UnityStats.frameTime, UnityStats.renderTime seem can only be read in OnGUI()
2. the FPS in Profiler(and Unity stats window) seems to match the value (1.0f / (UnityStats.frameTime + UnityStats.renderTime)), not sure but currently my experimental results match the calculation

package download link:
https://drive.google.com/file/d/1weD2QOAh7wyUWINor8Na0Ix-d__15vlv/view?usp=sharing