- Home /
Unity Javascript
I noticed that Unity uses programming language Javascript but it's like a different language than the standard Java? The one that is for developing web pages? Also, noticed that it uses C# also but haven't used it. I have used C++ but don't know if it's familiar to C#. I know it's stupid to ask which one is better, because everyone has his own favourite, but my question would be - is Unity Javascript the same with the standard Java? Thanks.
Answer by Bunny83 · Jun 13, 2011 at 11:04 PM
Javascript(or JScript) != UnityScript != Java
That are 3 different languages. UnityScript uses most of JavaScript(web) syntax but the background is totally different. JavaScript(JScript) in browsers uses a prototype based object model. Unityscript is compiled to CIL and executed by Mono exactly like C#. That's why Unityscript uses an inheritance based object model. That's the greatest difference between JScript and UnityScript.
Answer by jahroy · Jun 13, 2011 at 11:01 PM
UnityScript has nothing to do with java, but it is somewhat similar to java*script*. It uses a similar syntax, but is definitely different. For example UnityScript can optionally be strongly typed (unlike javascript). Java is something completely different and has nothing to do with Unity or UnityScript (or javascript).
Answer by Chris D · Jun 13, 2011 at 11:04 PM
In short, if you can use regular JS, you'll have no trouble migrating over to unityscript; there are just some idiosyncrasies to learn. If you're having trouble choosing between C# and JS (or even Boo), see this question:
http://answers.unity3d.com/questions/7528/how-should-i-decide-if-i-should-use-c-javascript-u.html
To clarify, you're talking about Javascript vs. Unityscript and not Java vs Unityscript, right? Because Java is something else entirely.
Your answer
Follow this Question
Related Questions
Learning Java for Unity 3 Answers
Looking for skilled individual to assist with problem 1 Answer
Setting Scroll View Width GUILayout 1 Answer
Is UnityScript the same as JScript? 4 Answers
Help needed with a pickup script 2 Answers