与 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; }