Example #1
0
        public static void EmitFrameMetaData <T>(Guid id, int tag, List <T> data) where T : struct
        {
            bool flag = data == null;

            if (flag)
            {
                throw new ArgumentNullException("data");
            }
            Type typeFromHandle = typeof(T);
            bool flag2          = !UnsafeUtility.IsBlittable(typeof(T));

            if (flag2)
            {
                throw new ArgumentException(string.Format("{0} type used in Profiler.ReportFrameStats must be blittable", typeFromHandle));
            }
            Profiler.Internal_EmitFrameMetaData_Array(id.ToByteArray(), tag, NoAllocHelpers.ExtractArrayFromList(data), data.Count, UnsafeUtility.SizeOf(typeFromHandle));
        }
Example #2
0
        public static void EmitFrameMetaData(Guid id, int tag, Array data)
        {
            bool flag = data == null;

            if (flag)
            {
                throw new ArgumentNullException("data");
            }
            Type elementType = data.GetType().GetElementType();
            bool flag2       = !UnsafeUtility.IsBlittable(elementType);

            if (flag2)
            {
                throw new ArgumentException(string.Format("{0} type used in Profiler.ReportFrameStats must be blittable", elementType));
            }
            Profiler.Internal_EmitFrameMetaData_Array(id.ToByteArray(), tag, data, data.Length, UnsafeUtility.SizeOf(elementType));
        }