- Home /
Using C++ instead of C# ?
I prefer to code my projects in C++ rather than C#. Is it possible?
Can I include C++ code in C#? Can I dynamically call a DLL from C#?
Answer by Bunny83 · Oct 21, 2012 at 12:27 AM
Basically yes. Since C++ also provides a .NET version of C++. However programming for CIL works a bit different to normal C++. Also C++ isn't directly supported so you would have to compile to a .NET assembly and add it to your assets. I strongly recommend to use C# instead.
Beside the true scripting support, if you have Unity pro you can use native code plugins (except when you build for web) which can be written in normal C++. However the interaction with the Unity API get's very complicated. Stick with one of the 3 supported languages.
Agree. It can be done with DLL's but things are so much smoother with C#.
Due to the nature of my project, the best solution seems to be compiling a DLL and calling the functions from C#. I personally hate having DLLs, so I'll end up wrapping my project into one nice executable.
If you care that much then you can use DLLs but I recommend using c# or js
Uhm what's the point of this single sentence posted 3 years after the question has already been answered? Do you think it adds anything that my answer hasn't covered yet?
I'm currently not in a "downvote mood" but with "answers" like that you certainly won't get friends here ^^. I'm wondering who approved that "answer"...
Your answer
Follow this Question
Related Questions
P/Invoke slow when in OnGui()? 0 Answers
variable from int to float in javascript for loop 1 Answer
AI help (C) 0 Answers