Can JavaScript be expressly used to develop Unity games?

后端 未结 1 503
星月不相逢
星月不相逢 2021-01-06 02:56

I would like an authoritative answer on a point that has been a question mark for me for a little while. There seems to be a frequent use of the term JavaScript to mean or

相关标签:
1条回答
  • 2021-01-06 03:08

    Short answer: No you cannot use PURE JavaScript. As far an I am aware - Unity uses it's own JS-like syntax (some people refer to it as Unity JS) but it is most commonly known as UnityScript.

    Your question arises from the fact that the Unity community refers to JavaScript and UnityScript as if they are equivalent and interchangeable.

    Whilst these look and feel extremely similar - there are some fundamental differences such as UnityScript being class-based whilst JavaScript doesn't support classes.

    You can definitely use prior JavaScripting conventions you have picked up within UnityScript as a LOT of it applies. The semantics used are a little different - but I've found it doesn't take long to pick up on the small changes.

    Read more about it here: UnityScript versus JavaScript

    Happy coding!

    0 讨论(0)
提交回复
热议问题