Unity Community


Results 1 to 9 of 9

Thread: Unity and C++


  1. Posts
    2

    Unity and C++

    Can I use C or C++ in conjunction with Unity? I have a C snippet that gathers raw input from the computer, and a C++ class to translate into mouse moves.
    I know there is the WinMultyMouseSDK wich is in C#, but I didn't want to learn C#. Do I have to?


  2. Posts
    801
    Well the main scripting languages used in unity are c# and unityscript, so you should probably learn one of them. Although I think you can use c and c++, then compiled them to a dll and use them in Unity as plugin, how ever it requires unity pro and it won't work on webplayer.


  3. Location
    GMA950
    Posts
    3,031
    Quote Originally Posted by d0100 View Post
    Can I use C or C++ in conjunction with Unity? I have a C snippet that gathers raw input from the computer, and a C++ class to translate into mouse moves.
    I know there is the WinMultyMouseSDK wich is in C#, but I didn't want to learn C#. Do I have to?
    You could learn Unityscript or Boo, but if you're a C programmer I would recommend C#.

    You should be able to adapt the C++ you have into a plugin in order to feed Unity input from multiple mice. From there, I suggest leaving unmanaged code behind entirely, learning C#, and enjoying the general productivity boost that writing Unity scripts will give you.


  4. Posts
    2
    UnityScript is something else, or is it Javascript? I saw there are only Javascript, Boo & C# in the Docs.
    What does Boo have in special to be used in Unity?


  5. Location
    Zürich, Switzerland
    Posts
    26,572
    It might be refered too as "Javascript" but its a unity specific language with no counterpart outside of Unity.

    Boo: nothing, its just an alternative that is not c style
    Also it forms the base for UnityScript at all


  6. Location
    Johnstown, PA USA
    Posts
    1
    Quote Originally Posted by dreamora View Post
    It might be refered too as "Javascript" but its a unity specific language with no counterpart outside of Unity.
    Actually, from the syntax and the fact that Unity is built on Mono, the "UnityScript" language is really a minor variation of Microsoft JScript. ( http://en.wikipedia.org/wiki/JScript ) - The closest thing to compare it to would be ActionScript 3.0.


  7. Location
    .lv
    Posts
    41
    UnityScript sure looks like ECMAScript, if you know one of them, it's easy to get into.


  8. Location
    Montréal Quebec
    Posts
    2,234
    If you are a C/C++ programmer, you'll feel at home with C#. It have lots of similarities of Java and C++.

    Tthe best thing to do is build a DLL C++ plugin, drop it into Unity Project and accees to it, create a wreapper or whatever you need.
    Cheers,
    Last edited by tatoforever; 02-02-2011 at 10:35 PM.
    Forgotten Memories Teaser
    Forgotten Memories Trailer
    I write shaders for the community!
    Dead Strike iOS (Top iOS game made with Unity).
    Nintendo Wii U and Sony (PS3/PS4/Vita) Licensed Developer/Publisher.
    __________________________________________________
    Georges Paz
    http://www.forgottenmemoriesthegame.com


  9. Location
    Munich, Germany
    Posts
    493
    And if you want to use C/C++ plugins you need Unity Pro and C#. Only C# offers the interface to those plugins afaik.

    It's easy to write the C# stuff for a C++ programmer - i started the same way
    My latest games:
    Driving Reckless on iOS/Android: http://drivingreckless.vidiludi.com
    Raccoon Rumble on iOS/Android: http://raccoonrumble.vidiludi.com
    Highway Run on iOS: http://highwayrun.vidiludi.com

    http://www.vidiludi.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •