Ejemplo n.º 1
0
        public void CopyFrom(NativeSlice <T> slice)
        {
            if (Length != slice.Length)
            {
                throw new ArgumentException($"slice.Length ({slice.Length}) does not match the Length of this instance ({Length}).", nameof(slice));
            }

            UnsafeUtility.MemCpyStride(this.GetUnsafePtr(), Stride, slice.GetUnsafeReadOnlyPtr(), slice.Stride, UnsafeUtility.SizeOf <T>(), m_Length);
        }
Ejemplo n.º 2
0
        public void CopyFrom(NativeSlice <T> slice)
        {
            bool flag = this.Length != slice.Length;

            if (flag)
            {
                throw new ArgumentException(string.Format("slice.Length ({0}) does not match the Length of this instance ({1}).", slice.Length, this.Length), "slice");
            }
            UnsafeUtility.MemCpyStride(this.GetUnsafePtr <T>(), this.Stride, slice.GetUnsafeReadOnlyPtr <T>(), slice.Stride, UnsafeUtility.SizeOf <T>(), this.m_Length);
        }
Ejemplo n.º 3
0
 public void CopyFrom(NativeSlice <T> slice)
 {
     UnsafeUtility.MemCpyStride(this.GetUnsafePtr(), Stride, slice.GetUnsafeReadOnlyPtr(), slice.Stride, UnsafeUtility.SizeOf <T>(), m_Length);
 }