public ProfilerMarker(ProfilerCategory category, string name, string param1Name) { #if ENABLE_PROFILER m_P1Type = ProfilerUtility.GetProfilerMarkerDataType <TP1>(); m_Ptr = ProfilerUnsafeUtility.CreateMarker(name, category, MarkerFlags.Default, 1); ProfilerUnsafeUtility.SetMarkerMetadata(m_Ptr, 0, param1Name, m_P1Type, (byte)ProfilerMarkerDataUnit.Undefined); #endif }
public ProfilerCounter(ProfilerCategory category, string name, ProfilerMarkerDataUnit dataUnit) { #if ENABLE_PROFILER m_Type = ProfilerUtility.GetProfilerMarkerDataType <T>(); m_Ptr = ProfilerUnsafeUtility.CreateMarker(name, category, MarkerFlags.Counter, 1); ProfilerUnsafeUtility.SetMarkerMetadata(m_Ptr, 0, null, m_Type, (byte)dataUnit); #endif }
public static ProfilerMarkerWithStringData Create(string name, string parameterName) { var marker = ProfilerUnsafeUtility.CreateMarker(name, ProfilerUnsafeUtility.CategoryOther, MarkerFlags.Default, 1); ProfilerUnsafeUtility.SetMarkerMetadata(marker, 0, parameterName, (byte)ProfilerMarkerDataType.String16, 0); return(new ProfilerMarkerWithStringData { _marker = marker }); }
public ProfilerMarker(string name, string param1Name, string param2Name, string param3Name) { #if ENABLE_PROFILER m_P1Type = ProfilerUtility.GetProfilerMarkerDataType <TP1>(); m_P2Type = ProfilerUtility.GetProfilerMarkerDataType <TP2>(); m_P3Type = ProfilerUtility.GetProfilerMarkerDataType <TP3>(); m_Ptr = ProfilerUnsafeUtility.CreateMarker(name, ProfilerUnsafeUtility.CategoryScripts, MarkerFlags.Default, 3); ProfilerUnsafeUtility.SetMarkerMetadata(m_Ptr, 0, param1Name, m_P1Type, (byte)ProfilerMarkerDataUnit.Undefined); ProfilerUnsafeUtility.SetMarkerMetadata(m_Ptr, 1, param2Name, m_P2Type, (byte)ProfilerMarkerDataUnit.Undefined); ProfilerUnsafeUtility.SetMarkerMetadata(m_Ptr, 2, param3Name, m_P3Type, (byte)ProfilerMarkerDataUnit.Undefined); #endif }