Version: 2023.1
public static void MemCpyStride (void* destination, int destinationStride, void* source, int sourceStride, int elementSize, int count);

描述

UnsafeUtility.MemCpy 类似,但可以通过 desinationStride 和 sourceStride 跳过字节。

// Functional equivalent to this (But with various optimizations)
byte* destinationBytes = (byte*)destination;
byte* sourceBytes = (byte*)source;
for (int i = 0; i != count; i++)
{
    UnsafeUtility.MemCpy(destinationBytes, sourceBytes, elementSize);
    destinationBytes += destinationStride;
    sourceBytes += sourceStride;
}