Beispiel #1
0
        public static ChiselBlobBuilderArray <T> Construct <T>(this ChiselBlobBuilder builder, ref ChiselBlobArray <T> blobArray, HashedVertices data) where T : unmanaged
        {
            var blobBuilderArray = builder.Allocate(ref blobArray, data.Length);

            if (data.Length > 0)
            {
                UnsafeUtility.MemCpy(blobBuilderArray.GetUnsafePtr(), data.GetUnsafeReadOnlyPtr(), blobBuilderArray.Length * sizeof(T));
            }
            return(blobBuilderArray);
        }