Search Unity

Feedback New Scripting Language Support?

Discussion in 'Editor & General Support' started by retrooper, Oct 26, 2020.

  1. retrooper

    retrooper

    Joined:
    Aug 28, 2020
    Posts:
    3
    I believe it would really benefit Unity and also the community if you also supported scripting in C++.
    Firstly, compilation would be sped up by a lot by scripting in C++.
    Secondly, C++ is fast, faster than c#(maybe not by a lot).
    Thirdly, let us look at a competing game engine.
    Why do people use Unreal Engine? First reason is, because of its great Visual Scripting System, second reason is just due to them supporting C++! C++ is perfect for game development, in my case I am much more comfortable coding in C++ than C#.
    Fourthly, your game engine is already written in C++? It won’t even be that difficult to just support C++, it would be amazing and a big change for Unity!
     
  2. bobisgod234

    bobisgod234

    Joined:
    Nov 15, 2016
    Posts:
    1,042
    I am not sure these things are necessarily true anymore, with Burst and DOTS etc.

    Learn C#, It should be a walk in the park if you are used to C++. If you are going to start using a new engine, adapt your skill set to that new engine, instead of expecting the engine to adapt itself to your skill set.

    I don't think it works like that.
     
  3. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,912
    I imagine it would probably be a huge engineering effort to "just support C++".
     
  4. retrooper

    retrooper

    Joined:
    Aug 28, 2020
    Posts:
    3
    I know C#, just I like C++ more due to some features C# misses.
     
  5. bobisgod234

    bobisgod234

    Joined:
    Nov 15, 2016
    Posts:
    1,042
    Do you have particular examples? There might be some equivalent C# feature.

    If you really wanted to, you could implement almost all your game in C++ as a DLL and treat Unity just as a sort of front end. It has been done before.
     
    Joe-Censored likes this.
  6. retrooper

    retrooper

    Joined:
    Aug 28, 2020
    Posts:
    3
    Code (CSharp):
    1. #define VERSION_NUMBER 2.0
    That isn't possible in C#.
    C# only lets you define it, but not give it a value.
    C# doesn't give you the option to pass an object through function arguments if its NOT by reference.
    C++ gives you that extra control to also pass objects to be copied in that method, or as reference.
    And I just like C++ more and one can achieve better performance using C++.
    Doing what you suggested makes it more complicated than writing a game should be, would be nice if Unity added support for it.
    Just a suggestion of mine.
     
  7. gillemp

    gillemp

    Joined:
    Nov 23, 2015
    Posts:
    81
    I think that all missing "features" of C# have a not very difficult workaround, and it is "safer" for beginners and not difficult for pros.

    Supporting another language would mean having to be sure that almost the double of things works and are updated at the same time.
    In addition, they would have to have more support on the teams and forums because of the additional variability of the situations.

    The performance differences are beginning to be no longer an issue. Increasing computational power, additional optimizations, ... are already taking place.

    So, after all..., what is the point? Making it easier for everybody to switch to Unity? Then it would make more sense to add support for Java rather than C++ but I still believe it is not worth it. They had support for JavaScript (UnityScript) once, and they dropped it because of the difficulty and lack of added value.
     
    Joe-Censored likes this.