private void AppendFrameEvent(JsonStringGenerator jsonStringGenerator, FrameInfoCrawler.FrameDebuggerEvent evt, FrameInfoCrawler.FrameDebuggerEventData evtData) { using (new JsonStringGenerator.ObjectScope(jsonStringGenerator)) { jsonStringGenerator.AddObjectValue("frameEventIndex", evtData.frameEventIndex); jsonStringGenerator.AddObjectValue("type", evt.type.ToString()); AppendSavedTextureInfo(jsonStringGenerator, "screenshot", evtData.savedScreenShotInfo); AppendRenderingInfo(jsonStringGenerator, evt, evtData); AppendRenderTargetInfo(jsonStringGenerator, evtData); AppendShaderInfo(jsonStringGenerator, evtData); } }
private void AppendRenderingInfo(JsonStringGenerator jsonStringGenerator, FrameInfoCrawler.FrameDebuggerEvent evt, FrameInfoCrawler.FrameDebuggerEventData evtData) { using (new JsonStringGenerator.ObjectScopeWithName(jsonStringGenerator, "rendering")) { jsonStringGenerator.AddObjectValue("vertexCount", evtData.vertexCount). AddObjectValue("indexCount", evtData.indexCount). AddObjectValue("instanceCount", evtData.instanceCount). AddObjectValue("drawCallCount", evtData.drawCallCount). AddObjectValue("componentInstanceID", evtData.componentInstanceID). AddObjectValue("meshInstanceID", evtData.meshInstanceID). AddObjectValue("meshSubset", evtData.meshSubset). AddObjectValue("batchBreakCauseStr", evtData.batchBreakCauseStr); if (evt.gameObject) { stringBuilder.Length = 0; GetGameObjectName(evt.gameObject, stringBuilder); jsonStringGenerator.AddObjectValue("gameobject", stringBuilder.ToString()); } } }