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?**
↧