UnityScript, JavaScript, C#

Since this is my first post I would like to greet the Unity3D community.

I found a lot of answers just by browsing through the community generated content and the atmosphere is really nice.

I am a beginner programmer. I started out with java and then found Unity3D, been having butterflies in my stomach since then.

Anyway, I’m still getting confused over unity scripting. If I understand correctly; Unity3D uses it’s own libraries, but adopted the syntax from JavaScript and C# (whichever the user feels more comfortable using). As a consequence there are a lot of subtle and not so subtle differences between using the .NET libraries in C# (let’s say while working in Visual Studio) or using the Unity3D libraries with C# syntax.

Basically the only thing C# in Unity3D scripting has common with .NET C# is syntax, am I correct?

Thank you for your time and best regards,

Rok

No, you’re wrong :slight_smile:

C# in Unity IS C#. Unity uses the Mono runtime, which is an open-source implementation of the .Net runtime. So, if you want to use any C# features such as arrays, lists, generics, delegates, co routines, they’re implemented just the same in C# in Unity as they would be in C# for .Net.

You might be getting mixed up by the fact that the thing that Unity calls “JavaScript” has little relation to the thing that a web developer would recognise as JavaScript. That’s why we generally prefer to call it UnityScript instead.