Results 1 to 6 of 6

Thread: Javascript Vs. C# in Unity

  1. #1

    Default Javascript Vs. C# in Unity

    I'm using Javascript to make a game on Unity but I hear people saying C# is better.
    Could anyone list me the pros and cons of using each one? I'm not really sure if I should switch to C#
    Dirt is life.
    I might drop Wiggly Worms.
    Visit GTSGO

    IGN: BlockOfDirt


  2. #2
    Master Sorcerer
    Join Date
    Mar 2015
    Location
    Michigan
    Posts
    875

    Default

    Javascript syntax and compiler for unity isn't as harsh, so it's great for beginners. However c# unity will work well in visual studio, supply "better"(better is stretched) functions and many tutorials I know stick to it. The manual will tell you the many key differences in function usage between the two.

  3. #3

    Default

    Thanks for the reply, I think i'll stick to Javascript for the moment.
    Dirt is life.
    I might drop Wiggly Worms.
    Visit GTSGO

    IGN: BlockOfDirt


  4. #4
    Master Sorcerer
    Join Date
    Mar 2015
    Location
    Michigan
    Posts
    875

    Default

    Quote Originally Posted by bestellen View Post
    I would say it depends very much on your past experience. If your background is in C++ or Java, you will likely feel most at home in C# - however if you're experienced with dynamically typed languages such as JavaScript / Basic or PHP, chances are you will prefer JavaScript.

    If you have no previous experience with programming - JavaScript might be an easier introduction - given that you do not need to worry about types and casting.

    Do note that writing JavaScript in Unity is not the same as writing it for web browsers (which is why it is popularly nicknamed UnityScript in the community). You should check out the tutorials to familiarise yourself with it if this is the route you're going to take.

    If you are planning to work with other programmers on a Unity project, I very much recommend that you decide from the beginning to work in the same language. While it is completely possible to combine scripts written in multiple languages into one project, you will very likely at some point run into issues due to the nature of the task of compiling and linking multiple languages.

    Finally do notice that all documentation and tutorials for Unity are currently written in JavaScript and of the three available languages for Unity, only C# examples are given in the .NET documentation (since you are working with mono, you have full access to the mono port of the .NET library).
    Remember to give credit to those you copy/paste off of!
    http://answers.unity3d.com/questions...ascript-u.html

  5. #5
    Master Sorcerer
    Join Date
    Mar 2015
    Location
    Michigan
    Posts
    875

    Default

    Quote Originally Posted by D0GE View Post
    that user seems like a spambot
    Maybe, but I have siggies disabled so I wouldn't know of any click bait of sorts. Maybe it's a foreigner of common language doing the usual weird stuff. Who knows.

  6. #6

    Default

    Quote Originally Posted by Block Of Dirt View Post
    I'm using Javascript to make a game on Unity but I hear people saying C# is better.
    Could anyone list me the pros and cons of using each one? I'm not really sure if I should switch to C#
    Okay, so c# isn't better if you use java but it's easier to learn that's why many peoples use it, im using c# too but it's only wasting time to you try figure it out. Use java if you are good at it.

Bookmarks

Bookmarks

Posting Permissions

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