Is there any c ++ support in the engine ?

Hello, I decided to try make my own game for both pc and android decided to ask you here if there is c ++ language support for writing scripts?

There is no accesible Cpp version of the Unity API as a whole. You can write “MonoBehaviors” (the basic components that control the game) in C# and there is a low level cpp API for some rendering features.
However like other C# environments you can use DLLs (or the equivalent on non-windows) and there is even a system that allows to port those (given the sourcecode) to most Unity supported Platforms.
If you seek to develop the entire game in C++ (meaning you are insane =D ) that won’t really work. Would be extreme hassle because the C++ side of the Engine is closed source.

Note that if performance of C# is your concern, Unity has the so called Burst compiler which compiles “jobified code” (a mechanism for asynchronous and mtithreaded programming with a classless C# subset) into extremely efficient instructions (even automatically using vectorization).

just adding for extra info,

Unity Scripting in C++
https://github.com/jacksondunstan/UnityNativeScripting

unity native rendering plugin example,

1 Like

You can make native C++ plugins.
https://docs.unity3d.com/Manual/NativePlugins.html

You can make those plugins for android. (related issues: https://discussions.unity.com/t/872082 )

However those plugins act as libraries, meaning you can’t really (or easily) interact with C# part of the game from them. You can’t make C++ MonoBehaviors, and the like, plus this sort of integration requires a lot of glue code which is tedious to write without a code generator.

Link provided by @mgear may be of use, however I wouldn’t bother with C++ programming in unity. In this scenario, Unreal engine would likely be a better choice despite using a C++ dialect and relying on inheritance instead of composition.

I’d love to see C++ bindings for unity, of course, but judging by the situation, that’s not going to happen in foreseeable future.