The title kind of says it all. Is it possible to replace C# with C++ on a game using Unity?
|
It is possible to use C++ with the Free version of Unity, although it is easier to work with if you have a Unity Pro license. All you have to do is wrap it up in a DLL and follow the instructions below on where to place it. I wrote an article that covers this topic: Unity and DLLs: C# (managed) and C++ (unmanaged)
Unmanaged means C++ and Managed means C# |
|||||||||||||||||||||
|
It is possible though inconvenient. You'd have to write managed C++ to achieve it. And yes, there is such thing as managed C++. Managed doesn't specifically mean C# and unmanaged C++. To achieve it you'll need to import UnityEngine DLL file. When you're finished you put it in the (Unity Project Name)/Plugins folder. Here would be the code you'd use: In the C++ file:
In the C# file:
That exact code wouldn't work but thats a base. |
||||
|