Skip to content

Instantly share code, notes, and snippets.

@lokixiang
lokixiang / NativeMeshTest.cs
Created April 10, 2019 14:13 — forked from LotteMakesStuff/NativeMeshTest.cs
[NativeCollections] How to copy a regular .C# array into a NativeArray suuuuuper quick using memcpy. its about as fast as its ever gunna get!
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Mathematics;
using UnityEngine;
public class NativeMeshTest : MonoBehaviour
{
private NativeArray<float3> vertexBuffer;
private Vector3[] vertexArray;
@lokixiang
lokixiang / NativeMeshTest.cs
Created April 10, 2019 14:13 — forked from LotteMakesStuff/NativeMeshTest.cs
[NativeCollections] How to copy a regular .C# array into a NativeArray suuuuuper quick using memcpy. its about as fast as its ever gunna get!
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Mathematics;
using UnityEngine;
public class NativeMeshTest : MonoBehaviour
{
private NativeArray<float3> vertexBuffer;
private Vector3[] vertexArray;