I'm going to start scripting in Unity3D pretty soon for game development using UnityScript (since I am a beginner). If I had experience in JavaScript (which I don't), will I find UnityScript any different? If so, how much of a difference is there between these two scripting languages?
Asked
Active
Viewed 2,090 times
4
-
1possible duplicate of [Can JavaScript be expressly used to develop Unity games?](http://stackoverflow.com/questions/27809074/can-javascript-be-expressly-used-to-develop-unity-games) – JJJ Jan 17 '15 at 17:19
1 Answers
6
This is summed up in the unityscript tag wiki here: https://stackoverflow.com/tags/unityscript/info
Main differences:
- UnityScript has classes, JS has no concept of classes (yet)
- The filename of a UnityScript automatically puts the code in a class of that same name (minus the extension)
- No global variables in UnityScript
- In UnityScript,
this
is always the class pointer (akaself
)
Specifically this link tells you all about the differences between JS and US: http://wiki.unity3d.com/index.php/UnityScript_versus_JavaScript