- Home /
I really want Unity support C++ as scripting API
As I said in the title, I really love Unity and I want Unity support C++ as unity scripting API. C++ is so great, Unity used it for itself ( Unity Engine ) and it should exists on unity scripting api too. I really hope Unity will support it soon :)
Answer by Rion313 · Jan 24, 2019 at 06:09 PM
To be honest, C++ sucks in most cases it is used to, especially in game dev. Unity uses C# to ensure that backend is done in best ways. For long time, I used to think the same as you did, until I started a work, where you go really deep into C++. But before you get offended. I think that for the same reasons C++ sucks, it is the best language.
But it is only because there is no better language, not because it is good.
C++ binaries are giant, with tones of redundant code, this is usually solved by not writing the code in proper way, but by making tones of nasty code and workarounds, in bigger projects this would create a ton of mess you wouldn't want.
Also compilation time in C++, this could be other topic. If you would like to use (and I assume you would, because they are amazing) template metaprogramming simple compiling scripts for editor would take years to complete, due to all the C++ complexity. C# is really simple language compared to C++, not only due to its learning curve, but also because it allows to do most of the things in flight. And from what I can say - Unity team does its best to ensure, that all you do is as good as possible. Just comparing the engines from now on with what was few years ago, Unity was this heavy, slow engine that was mostly for small 3D games, because adding something bigger would consume most of your resources. Now - it can create giant worlds and does great job doing it.
For more reasons why C++ is not that great in making games check this video. It is long and even has second part to it, however Jonathan makes great points on what should we focus on while creating games.