using System.Collections; using System.Collections.Generic; using UnityEngine; using Unity.Collections; using Unity.Collections.LowLevel.Unsafe; namespace SLZ.CustomStaticBatching { public unsafe static class NativeArrayClear { unsafe public static void Clear(ref NativeArray array, long count, long start = 0) where T : struct { UnsafeUtility.MemClear( (byte*)NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks(array) + start * UnsafeUtility.SizeOf(), count * UnsafeUtility.SizeOf() ); } } }