MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ToArray

Function ToArray

Source/Engine/Scripting/ManagedCLR/MUtils.h:461–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459 /// <returns>The output array.</returns>
460 template<typename T>
461 MArray* ToArray(const Span<T>& data, const MClass* valueClass)
462 {
463 if (!valueClass)
464 return nullptr;
465 MArray* result = MCore::Array::New(valueClass, data.Length());
466 MConverter<T> converter;
467 converter.ToManagedArray(result, data);
468 return result;
469 }
470
471 /// <summary>
472 /// Allocates new managed array of data and copies contents from given native array.

Callers 5

InitCustomNodeMethod · 0.85
CopyToMethod · 0.85
GetEnumeratorMethod · 0.85
BoxVariantMethod · 0.85

Calls 11

GetAddressFunction · 0.85
NewFunction · 0.50
GetLengthFunction · 0.50
LengthMethod · 0.45
ToManagedArrayMethod · 0.45
GetMethod · 0.45
CountMethod · 0.45
ResizeMethod · 0.45
ToNativeArrayMethod · 0.45
ReleaseMethod · 0.45
LinkMethod · 0.45

Tested by

no test coverage detected