Skip to content

Instantly share code, notes, and snippets.

@Syy9
Created July 31, 2018 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Syy9/4cf57ac391f67e96aa0065b929b74698 to your computer and use it in GitHub Desktop.
Save Syy9/4cf57ac391f67e96aa0065b929b74698 to your computer and use it in GitHub Desktop.
How to access Unity Status
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