- Home /
Getting an array of verts and triangles from a Native plugin
I'm currently writing a wrapper/plugin for a small library that was written in C++. In one of the libraries functions, it passes back a structure, that looks something like this -
struct ConvexHullResult
{
unsigned int mVcount; // number of vertices.
float *mVertices; // vertex positions.
unsigned int mTcount; // number of triangles.
unsigned int *mIndices; // indexed triangle list.
};
The issue I'm having, is that I don't know how to read the vertex, and triangle list arrays back into Unity, without using the unsafe keyword, which can't be used in Unity.
Does anyone know the correct way to do this?
I'd like to avoid messing with the code for the actual library, since I want to keep the scope of the native plugin to being a wrapper only.
Answer by jameslee0227 · Nov 18, 2010 at 08:26 AM
maybe monodevelop has unsafe code not compltibility
....
unity asset store
search c++ image lib
Your answer
Follow this Question
Related Questions
Call Unity class in XCode 1 Answer
Import (mixed assembly) managed C++/CLI DLL plugin 0 Answers
xCode to Unity communication? 1 Answer
Can I code a native plugin for iOS in C/C++? 0 Answers
C++ Callback in another thread 1 Answer