Question by
luigitramontana · May 18, 2018 at 04:24 PM ·
c#wrapper
C# wrapper crashes unity
I use a c# wrapper in which I use a c++ project (very standard, have always worked for me in various c# projects, eg iot). The same happens with a basic class library
namespace ClassLibrary1 {
public ref class Class1{};
}
by itself the c# wrapper works fine in unity; But as soon as I simply instantiate the c++ class within the c# classlib (Class1 name = new Class1() ) Unity crashes! Why does this happen? I think this wrapper method would be a warm welcome for those who have all their algorithms in c++ to avoid DllImport which for me is not an option, and I would have to give up on unity.
The crash dialog in win7 only says "Unity Editor has stopped working". Stepping in debug this happens exactly at the point were the cpp class is instanced.
Comment
Your answer
