Record Editor measurement scope without claiming device render metrics
This commit is contained in:
@@ -60,7 +60,7 @@ namespace MagnetismHeroes.Editor
|
||||
{
|
||||
public string sourceCommit, name, mode, utc, board;
|
||||
public bool sourceDirty;
|
||||
public int width, height, groups, balls, faces, numbers, capes, liveGameViewDrawCalls, expressionOverride;
|
||||
public int width, height, groups, balls, faces, numbers, capes, editorUnityStatsDrawCalls, expressionOverride;
|
||||
public long allocatedMemory, textureMemory, voiceMemory;
|
||||
public float cameraRenderMilliseconds;
|
||||
public Vector3 cameraPosition, fixedVisualPivot = Vector3.up * .65f; public Quaternion cameraRotation; public float fieldOfView;
|
||||
@@ -104,7 +104,7 @@ namespace MagnetismHeroes.Editor
|
||||
board = JsonUtility.ToJson(board.Mode == BoardMode.FreePlay ? (object)board.ToFreePlayState(app.Orbit.Snapshot()) : board.ToPuzzleState(app.Orbit.Snapshot())),
|
||||
allocatedMemory = Profiler.GetTotalAllocatedMemoryLong(), textureMemory = UnityEngine.Object.FindObjectsByType<Texture>(FindObjectsSortMode.None).Sum(texture => Profiler.GetRuntimeMemorySizeLong(texture)),
|
||||
voiceMemory = Resources.FindObjectsOfTypeAll<AudioClip>().Sum(clip => Profiler.GetRuntimeMemorySizeLong(clip)),
|
||||
liveGameViewDrawCalls = UnityEditor.UnityStats.drawCalls, cameraRenderMilliseconds = (float)timer.Elapsed.TotalMilliseconds };
|
||||
editorUnityStatsDrawCalls = UnityEditor.UnityStats.drawCalls, cameraRenderMilliseconds = (float)timer.Elapsed.TotalMilliseconds };
|
||||
File.WriteAllText(folder + "/" + name + ".json", JsonUtility.ToJson(record, true));
|
||||
}
|
||||
finally
|
||||
|
||||
Reference in New Issue
Block a user