Hi, I read online that we can write c++ code and import the dll into unity. Most of the demos/examples online import functions but not classes. I was wondering if we can import a class, instantiate and objects, and call its functions in c#
Thanks
Hi, I read online that we can write c++ code and import the dll into unity. Most of the demos/examples online import functions but not classes. I was wondering if we can import a class, instantiate and objects, and call its functions in c#
Thanks
If you write a managed DLL, you can import it into a Unity project. It works the same as importing a managed DLL into a non-Unity project. When you import the DLL, you get the whole thing, classes and everything.
To clarify, that means writing your DLL in C#, or C++ with the CLR extensions, or Visual Basic, or some other .NET language. There also might be version considerations. I think Unity only supports up to .NET 2.5. Correct me if I'm wrong.