Watch this video in context on Unity's learning pages here - unity3d.com/lea... Some of the core differences between C# and Javascript script syntax in Unity. Help us caption & translate this video! amara.org/v/V6ce/
while mostly negligible c# is indeed a lit bit faster, but mainly because it forces you with good practices, the only real improvement over js are delegates which don't exist in js, if you are starting now go with c#, if you already know js you may to stay with it a bit longer but i would advise you to start working with c#
It was added with C# version 3.0, so if you've not used C# since 2008 (or had to stick with 2.5) then it's not something you'd have come across. Basically, it just means the compiler uses the context to determine the type. There's also the dynamic keyword, which means the type isn't determined until runtime.
Funnily enough, I feel the exact opposite. I can't stand the "var varName : varType" syntax. To me, the first word is almost insulting--like I'm not smart enough to know that a variable is what's being declared. And having the variable type come _after_ the name is, to me, counterintuitive. I like to know _exactly what it is_ I'm dealing with before I know _what its name is_. The same thing even applies to functions. It's almost as if the syntax is written backwards, perhaps for people who read right-to-left. I find it to be an awkward language to decipher and work with.
I don't understand why the hell they use boo and not java, especially since android devices ARE java. I'm pretty sure much more people know java instead of boo
+mayanphsyco C# and Java are similar syntactically and if you know one, you can pick up the basics of the other in minutes and thats all you need to know for this. On the other hand, boo is Pythonic and very elegant like other Python influenced languages. Having both C# and Java options are pointless. OTOH, Python like and C# and Javascript makes more sense.
Hello! I wan't to ask,will you ever make a javascript tutorial? When i go to Unity website it is all C#.Even i am super noob and have no programming experience i do understand variables,a little functions,if statements and couple more of those stuff,so i don't really wan't to go and watch C# when i made some progress in Javascript...Official Javascript would be awesome so answer please..
No one is claiming Boo? wtf is this shit? Boo is more readable and cleaner code. I'll take less typing over C# and UScript any day. And when it comes down to it all 3 are compiled down into the same shit, so performance should really not be a factor. Give the python community more love god damnit Unity! Where is the C# vs JS vs Boo video? Stop neglecting us. I want more than just Boo text examples! Equal time for the Boo users!
C# relates more to the native Java/C/C++ that I am used to. JavaScript is like the simplified short hand of Java but for noobs. So I'm sticking to C# only because it's what I was used to along time ago.
i got used to object oriented languages like java so for me C# is better, and more organized than javascript (since you have stuff from biggest to smallest)
i started with javascript back in the day, and used it my whole time in Unity. Now I head that C# is the dominant language and javascript has gone the way of the dinosaurs. New language to learn now i guess
Thanks for the guide! Hope to see more info on this, I m migrating from js to C#, but experienced lot of code structure different. Hope you could provide more sections on the differents between C# and js. Thanks again!
Go C#. Most, if not all of the official Unity tutorials (and live training sessions) are done in C#-only. Plus it arguably has several advantages over Javascript.
+MrAndrewrock if your new use javascript, and DO NOT use the official tutorials, they are outdated and leave you more confused than you were at the start
There's more support for C# including tons of information outside of the unity community. The JavaScript that Unity uses is sort of "tuned" for working in unity and doesn't really apply anywhere else.
UnityScript is a straight hallway that goes right to the room you're looking for. C# is a confused series of hallways that goes all the way around the building. It's a shame Unity no longer supports UnityScript.
1- in C# also exists the keyword var, u can type things like: var x = 5; var ball = new Ball(); 2- using var is a bad habit, it makes your code less intuitive. What do u prefer: spend a little more time in your code by typing a larger and intuitiver variable name and later, when u reuse that code its beautifull; or use something like var, that will save you the time of typing a couple more letters. 3- Just kidding, bro, just trying to piss java scripters off xD