Have a C++ DLL that produces a series of contours (a couple of connected points) provided through a single GChandle "pinned" array. Now I need to separate each contour into its own C# array to use them in an engine function (the engine being Unity). Sure I can do this by copying, but as this is fairly performance critical, I'm hoping for a more direct solution.
Is it possible to get an array that points to a selected index from larger vector? Like an equivalent to the following C++ code (here done with ints):
int* large_array = new int[1000];
int* sub_array = &large_array[50];
std::cout << (large_array[70] == sub_array[20]); // <-- True
Huge thanks in advance :)