/// <summary> /// Signal the end of the event /// </summary> public void End() { if (m_ActiveCaptureId != 0 && m_ActiveCaptureId == TraceProfiler.ActiveCaptureId) { TraceDLLAPI.AddAsyncEvent(false, m_EventId, m_EventInstanceId); } m_ActiveCaptureId = 0; }
/// <summary> /// Signal the beginning of the event /// </summary> public void Begin() { if (m_ActiveCaptureId != 0) { Debug.LogError("AsyncEvent.Begin calls cannot be nested"); } if (TraceProfiler.ActiveCaptureId == 0) { Debug.LogError("Cannot begin an async event when profiling is not active"); } m_ActiveCaptureId = TraceProfiler.ActiveCaptureId; TraceDLLAPI.AddAsyncEvent(true, m_EventId, m_EventInstanceId); }