Unity prefered language?

What is the main scripting language Unity is using? Javascript, C# etc. I am asking this question because in our company we are considering on buying Unity and want to know in order to allocate the required people or train them. Thank you.

Javascript seems to be the way for beginners/intermediate/advanced and C# seems to be advanced users, as theres not a lot of C# script examples compared to the solid majority of javascript.

For example if someone askes me to write something in javascript theres a range of sources to access: forum snippets, Wiki scripts and the script reference, but if they required C# I wouldnt know where to start, as I dont know the syntax.

Thats my personal view on the topic

AaronC

Since Unity supports C#, Javascript and Boo (Dialect of Python) there is not one main scripting language.

I just got a job a month back which is why I’m using Unity now. I have some experience with both C# and Javascript, mostly C#.

I had no experience with Unity before I started to work at my current job and I had to learn Unity myself. This is not a problem at all since there’s a lot of good tutorials, online manual and these forums to help you out.

So, someone with good programing experience and knowledge of C#, Javascript or Boo would be the person you’re looking for.

Thank you for the reply. We have experience in Javascript so if you state that the examples are in JS then its better than I hoped for.

Just to be fairly warned, Unity’s Javascript is a custom implementation (based off of Boo), so it’s not the regular Web-browser JS you may be use to. The syntax is the same as JS, but the semantics of the language are much more like Boo.

But, it still should be easy to get into :slight_smile:

Er… um…

Real JavaScript is very dynamic, like real Python. Unity JavaScript is JavaScript “dumbed down” enough to compile to the CLR, much as Boo is Python “dumbed down” enough to compile to the CLR. Also, a lot of core JavaScript functionality has been omitted and you’re expected to use Mono libraries instead (notably for string utilities).

Here’s my attempt to document the differences between Unity JavaScript and “normal” JavaScript:

Well, I guess semantics wasn’t the right word(?). What I meant is that you won’t find a lot of the features in ECMAScript JS in Unity’s JS. For example, closures, first class functions, it’s object system (yes, they both have object systems, but they seem to be different… But, I haven’t used ECMAScript JS that much either), Unity’s type inference vs pure dynamic typing (but that can be disabled), and in Unity’s JS every object is a reference (well, not really… But you can’t really create a struct which has pass-by-value semantics).

That’s what I meant :slight_smile:

Is there any plan in place to add more features to Unitron in the future to support things like Javascript intellisense, etc…?

I prefer C#, but as noted above you could pick any of the three. Word of caution though: Using more than one language is possible, but integrating them can cause serious headache. Whichever language you choose, make sure it is the right choice for you.

I went through javascript and c# and im currently using c# because i feel more comfortable with.

I heard that javascript was used for fast code sketching(?) to test out features and routines and c# for serious programming but i ended up using c# for everything, but i know this same scenario happen to other people using javascript

I personally would recommend c# but whatever language you choose you will be able to do almost anything that you can do with the other easily, one thing though, program each project with one language only, if you mix languages you will probably get to some troubles later on

.org