4

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?

apxcode
  • 7,696
  • 7
  • 30
  • 41
droman07
  • 127
  • 1
  • 8
  • 1
    possible 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 Answers1

6

This is summed up in the 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 (aka self)

Specifically this link tells you all about the differences between JS and US: http://wiki.unity3d.com/index.php/UnityScript_versus_JavaScript

Community
  • 1
  • 1
CodeSmile
  • 64,284
  • 20
  • 132
  • 217