Search Unity

  1. Unity 2019.4 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  3. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Is there a way to allow coding in C++ instead of C#?

Discussion in 'Getting Started' started by Hyakinthosll, Jul 1, 2020 at 7:42 AM.

  1. Hyakinthosll

    Hyakinthosll

    Joined:
    Feb 12, 2019
    Posts:
    1
    I really want to learn C++ because I think I could use it more in the real game development business. Are there any plugins?
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    4,006
    Ah C# the language that is not used in real game development ;)
    If you are just starting to learn to program then I would strongly urge you not to learn C++ with Unity. Unity is focused on C#, you can use C++ but the process is not as simple and much less user friendly.
    Learn C#, it will teach you a lot of the same skills which can then be transferred over to C++ once you are comfortable.
     
    Joe-Censored and Ryiah like this.
  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    6,096
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    15,844
    Wishful thinking. Game engine development is C++ but actual game development is rapidly shifting away from C++. Unity isn't the only game engine to use C# and the others that don't have it have languages like Python, Lua, etc.

    Unreal 4 is one of the few engines out there that allows you to code the game itself in C++, but Epic Games has stated that they have been considering an alternative language (though they don't know the form it will take) to make life easier.
     
    Last edited: Jul 2, 2020 at 10:21 PM
  5. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    8,819
    Hmm... perhaps I should point out MiniScript to them. :)
     
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    8,520
    If you really want C++, use Unreal Engine instead.

    In Unity, the engine itself is primarily in C++. Your scripts are in C#. If you select to compile using IL2CPP, your C# scripts are compiled to IL, which is then converted to C++, and finally to machine code similar to any other C++ application. So the benefits of writing your scripts in C++ are fairly limited, while the downsides of C++ are all still there.
     
unityunity