Uh, you were misled, sorry. Unity doesn’t support JavaScript. It support UnityScript, which is a very different language that has been dressed up to look kind of like JavaScript. But it’s not even all that close. If you paste any Javascript sample code from the web into Unity, maybe one line in ten will be valid, working code.
You will have to learn a new programming language, yes. But this is not as daunting a prospect as it sounds. C# is a language that actually has a lot more in common with UnityScript than UnityScript has in common with JavaScript. C# is also a language that has millions upon millions of users worldwide, including people not working in Unity. If you paste C# sample code into Unity, it will almost always work.
It’s much easier to get help on the forums if you’re working in C# - the C# userbase in Unity is about 5x larger, and much more likely to be professionals and/or professionally educated (that is, more able to help), whereas any given randomly selected JS user is more likely to be a Unity rookie as likely to be in need of help as the person asking the question. (What I’ve found is that the majority of the time JS users have their questions answered here, they are answered by C# users who have been using Unity long enough to remember Unity 1.x when it was actually worthwhile to use JS.)
Plus, Unity’s own C# tutorials are excellent, and I have little doubt that part of the process of deprecating the JS language will include copious tutorials to help JS users transition to C#, and most likely software to help convert codebases as automatically as possible.
What will happen is probably the same thing that happened when they deprecated Boo. There won’t be any documentation created anymore, they won’t make any promises that it’ll work, and they’ll remove the button that creates a script in that language.
It might be that they’ll get rid of UnityScript more thoroughly, though. I suspect that Boo’s stuck around so long since (I believe) it’s used to make UnityScript run. So maybe they’ll pull the plug properly and get rid of it all in one big swoop? idk.
In the mean time, why don’t you write code in a good language? Here’s an example
import UnityEngine
class TestMe(MonoBehaviour):
def Start():
Debug.Log("hello")
That nag usually starts a while after a new release is out though. The only way to know what patches exists at all times is to read the stickies in the forum. Patch releases are usually safe when you’ve frozen on a version, everything else you test before you upgrade.
So what happens to the JavaScript developers?
I work all day on my job as a FrontEnd developer with JavaScript, i don’t want to learn a new language to create new game projects…
And why should i freeze with a version? I will always keep stuck with the same bugs and same characteristics?
I always hated C, other than on game developing i don’t see future for it. I keep seeing new fucking big technologies developed for JavaScript, where are the C# ones?
And why choose C# over UnityScript? I hate the people that make shitty code with JavaScript, but overall i keep thinking JavaScript is better.
(I know UnityScript is not JavaScript, but it’s almost the same… just if they updated it to ES6…)
It’s not the same language you use, it’s just the same name. Sorry to burst that bubble. None of what you said makes any real sense. C# isn’t anything like C either.
There is no relationship at all, and never can be, between real javascript and unityscript. Took me about a day or so to switch from unityscript to C# and I wasn’t really trying.
Just need to prefix your variables / change a few habits. That’s it. Really. That’s it. This is the single reason nobody understands your panic.