static public List <UnityEngine.Vector4> ListFromVtArray(VtVec4fArray input) { var output = UsdIo.ArrayAllocator.Malloc <UnityEngine.Vector4>(input.size()); unsafe { fixed(UnityEngine.Vector4 *p = output) { input.CopyToArray((IntPtr)p); } } return(output.ToList()); }
static public UnityEngine.Color[] ColorFromVtArray(VtVec4fArray input, ref UnityEngine.Color[] output) { if (output.Length != input.size()) { output = UsdIo.ArrayAllocator.Malloc <UnityEngine.Color>(input.size()); } unsafe { fixed(UnityEngine.Color *p = output) { input.CopyToArray((IntPtr)p); } } return(output); }