x


C# or UnityScript

I know there are other people who asked this question but i just want to know for sure if i should learn c# or javascript (or unityscript) because i heard that unity script is easier to get into while c# is not but i worked with both languages for about a month now and unityscript is alot easier but in c# if i have an error it is easier to spot and i want to know from people who worked with both languages and tell me which is better.And i also heard that if i get a book about javascript it wont be the same in unity. (oh and i heard that unity script doesn't have as many tutorials but c# does since its from microsoft and that its derived from c++)

more ▼

asked Feb 05, 2011 at 12:20 PM

mido555 gravatar image

mido555
74 18 16 22

Read the FAQ; discussion questions involving opinion should be posted elsewhere, like on the forums.

Feb 05, 2011 at 12:29 PM Eric5h5
(comments are locked)
10|3000 characters needed characters left

4 answers: sort voted first

if you're into Unity for the long term, I'd recommend C#

if you're just tinkering around with Unity to see what it can do ... then UnityScript is fine

I'm currently in the process of switching to C#, since coding in that language is much more current object oriented programming style (e.g. C# for .NET, its very close to Java programming etc.)

I would expect most serious Unity programmers to work in C#

so if you think you'll be doing a lot of coding (in general, or specially for Unity) then C# is the way to go

if you haven't done much programming before, then either (a) learn Unity with UnityScript to get a feel for what programming is, then switch (not too hard) or (b) learn to program in Java or C# first, and then apply what you've learnt to C# programming in Unity

finally ... the C# way of programming in Unity makes it much more obvious that you are programming in an Object Oriented language, and that what you attach a script to a GameObject you're actually adding an "instance" of your script class to the GameObject - but if this last sentence is gobblygoop to you, then you'll want to learn some OO programming concepts before jumping into C# in Unity

I hope this helps ... Matt ..

p.s. I've been teaching programming to novice computer students at various universities and colleges for over 10 years, and am happily throwing my year 2 degree students into Unity with C# - they learnt Java as their first programming language in year 1 - and they're doing fine

my year 4 students last year created some nice games (in teams) - most of them switched from UnityScript (we only started with Unity for the first time, and most tutorials we found were in UnityScript) to C# for their larger second project - see the games from the 2 teams here (some of my students were visiting from a French university ...) http://www.saintgermes.com/

more ▼

answered Feb 06, 2011 at 11:23 PM

matt smitih gravatar image

matt smitih
56 3 2 4

That is an awesome response, thank you. But i have one more question, ive heard that programming in boo is exactly the same as c# just with less typing is that true?

Feb 07, 2011 at 01:10 PM mido555
(comments are locked)
10|3000 characters needed characters left

I think there are two significant technical reasons to use C#, the first of which is that the UnityScript runtime adds to the size of projects (about a MB). That said, I'm not sure whether UnityScript generates bigger or smaller code binaries in general than C# scripts of equivalent complexity — I suspect this is a wash. The second benefit of using C# is that the Mono documentation (which is written by and for C# programmers) will make more immediate sense to you as a C# programmer.

Personally, I prefer UnityScript because it's significantly more economical to write code in (less boilerplate) and disagree with the "serious coders use C#" assumption. There's nothing to stop you mixing the two (and indeed calling C# code from UnityScript code and vice versa.) But, if you do pick UnityScript there are the two issues I mentioned above.

more ▼

answered Oct 28, 2012 at 08:54 PM

podperson gravatar image

podperson
151 1 3

(comments are locked)
10|3000 characters needed characters left

you should start with javascript because it is way easy to start out with well it is for me it cannot do all of the things c# can but if you start with c# it is complicated but the languages are very much alike

more ▼

answered Oct 29, 2012 at 12:18 AM

FrostHDD gravatar image

FrostHDD
31 31 28 29

(comments are locked)
10|3000 characters needed characters left

I think C# is a good choice.I don't think it's harder than java script. If you know one programming language, it's not even hard to learn it,1 week is ok.

more ▼

answered Oct 29, 2012 at 12:59 AM

Yanger_xy gravatar image

Yanger_xy
325 64 54 68

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x8805
x6018
x4766

asked: Feb 05, 2011 at 12:20 PM

Seen: 2851 times

Last Updated: Oct 29, 2012 at 12:59 AM