Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

iOS Plugin - Pass a struct from C++ to C#

$
0
0
I need to pass a struct from C++ to C#, and I'm not sure where to begin. I am more familiar with Unity / C# than Xcode / c++. I have found some answers that mention "Marshaling", but the info is over my head, and I can't seem to find a simple example. **In C++ I have this struct:** extern "C" { typedef struct StructName { void* valueA; int valueB; int valueC; float valueD[4]; int valueE; int valueF; int valueG; uint64_t valueH; float valueI[6]; } StructName; } extern "C" StructName GetStruct() { return structVariable; } **From C# I would like to call the above GetStruct method and be able to access the properties of it. How would I do this?**

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>