-1

enter image description here

I am new and about to learn unity. It is personal(free) version. I was trying to code in JavaScript, but it only shows me the coding option for C#. I hope you could help me out for this problem. thankyou!

George
  • 6,630
  • 2
  • 29
  • 36
NEMØ
  • 21
  • 4
  • Might want to check out the answer here https://answers.unity.com/answers/1425112/view.html – Shogunivar Nov 06 '17 at 16:03
  • I would highly recommend leaning c#. It's really useful to learn a full blown object oriented programming language, and the skills you learn are fairly easily transferred to java and c++. I've improved a lot since switching to C# and although it's tough at first, I found that once I got the basics down my programs became much much better. And the way I thought about programming changed entirely. Also most of the official unity tutorials (which are great and super helpful) use c# scripts. So you'll be missing out on all that sweet sweet learning. – Adam B Nov 08 '17 at 08:44
  • thanks a lot sir.. I highly respect your answer. Similarly, can you suggest any source from where I can learn C#. maybe some kind of website or youtube channel that you prefer. – NEMØ Nov 09 '17 at 18:16

2 Answers2

2

It's no longer there by design, in a blog post from unity

It’s been with us since Unity 1.0, but its time is finally coming: we have begun the deprecation process for UnityScript, the JavaScript-like scripting language available as an alternative to C# in Unity today.

As for why it's not in the create menu, there is this post on their forums with the answer

Secondly, you might have already noticed: the Unity 2017.2 beta no longer has a ‘Javascript’ (a.k.a UnityScript) option in the Create Assets menu. All we have done at this point is remove the menu item; all the support is still there, and you will still be able to create new UnityScript files outside of Unity (for example, via MonoDevelop). We’re doing this to help ensure that new users do not continue to adopt UnityScript; it would be irresponsible of us to let them invest time in learning it when it is not long for this world.

By Dragate

Community
  • 1
  • 1
George
  • 6,630
  • 2
  • 29
  • 36
1

You have to click on the gameobject you want to assign the script to. Then follow these steps:

  1. On the inspector menu, click on the button add component
  2. Then scroll to the bottom and click on new script
  3. Under the name you will see an option to switch between C# and JavaScript

Here is a video to help you understand how to properly write in JavaScript in Unity (though you should really be using C#, it's worth it!)

arthurvillar
  • 41
  • 1
  • 4