Created
July 31, 2018 23:06
-
-
Save Syy9/4cf57ac391f67e96aa0065b929b74698 to your computer and use it in GitHub Desktop.
How to access Unity Status
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
public static class UnityStatusGetter { | |
[MenuItem("Hoge/Fuga %g")] | |
public static void PrintData() | |
{ | |
Debug.Log("batches : " + UnityStats.batches); | |
Debug.Log("drawCalls : " + UnityStats.drawCalls); | |
Debug.Log("dynamicBatches : " + UnityStats.dynamicBatches); | |
Debug.Log("dynamicBatchedDrawCalls : " + UnityStats.dynamicBatchedDrawCalls); | |
Debug.Log("staticBatches : " + UnityStats.staticBatches); | |
Debug.Log("staticBatchedDrawCalls : " + UnityStats.staticBatchedDrawCalls); | |
Debug.Log("frameTime : " + UnityStats.frameTime); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment