|
Hey We want to pass an array from c# script to c++ plugin so that c++ plugin can modify that array and we can access it back in c# script. What we are doing is : c# script : private static extern void _score_global_all( ref IntPtr ptrResultVerts, ref int resultVertLength); public int[] get_score_global_all() { c++plugin void _score_global_all( int* ptrResultVerts , int* resultVertLength) { Output in c# script : resultVertLength=5; // got it right we get an exception "NullReferenceException" in Marshal.Copy() saying source i.e. ptrResultVerts is null. Any Idea How to do this right ...? Any other Approach for same with sample code will be appreciated .!!!! Thanks
(comments are locked)
|

Is the question relevant to Unity3D?