Does Unity plan on discontinuing JavaScript support? I haven’t seen anything widely announced, but I’ve found several threads where people mention something of the sorts… like this answer
Wondering if it’s worth starting a project in C# instead… absolutely prefer js.
There is no official announcement yet that the language is going to be phased out. But it is going to be phased out. It might take a few years, but I wouldn’t count on it hanging around.
As evidence
UnityScript never gets mentioned in any of the various media channels used by Unity
No features have been added to UnityScript in years
No documentation exists for UnityScript, and Unity has put forward no effort to create the documentation
Newer services and engine features are not documented in UnityScript
There are still a few users that like the language. But slowly they are switching to C#. Once the users drop below a certain critical mass then Unity will drop the language.
I’d totally suggest starting your next project in C#. The only real reason to use UnityScript is if you are dealing with a legacy code base.
*new members are required to pop to the shops and acquire said cookies, also we’re low on milk
on a more serious note: there isn’t that much difference between unityscript and c#, most of it is just syntax (type before name vs name before type, return type before function name vs return type after parameters etc.)
Please let JavaScript die. Asset store sellers: please stop using Javascript.
There is really no reason whatsoever to use it when you can use C#.
I have noticed a pattern though. It could be just chance but whenever I purchase an asset store item with scripts written in JavaScript, they are very poorly written. No indentations, no caching of components. Completely messy coding. I don’t know why this is, it just seems to go along with the territory of Javascript.
You cant even have compiler warnings disabled in Javascripts. Right now I have over 350 compiler warnings thrown at me every time I compile the projects, all because of Javascripts from the asset store.
Well, they can’t give up Javascript support completely, as the WebGL build uses it. But for input scripting, yeah maybe - I use C# all the time myself, and when I encounter Javascript examples of Unity code, I translate to C#.
I haven’t seen @Tiles in a while. But he normally does pop in just to defend UnityScript. Apparently it’s the fault of C# fanboys like me that the language is dying.
WebGL deploys in JavaScript. That has nothing to do with support for scripting in UnityScript. Two different languages here.
Are you referring to @Tiles who only shows up in threads concerning UnityScript?
I don’t believe they’ve planned anything of the sort. That said between new users being guided towards C#, older users being fed up with the lack of support for it, and older users who favored it quitting Unity (Tiles, for the record, doesn’t actually make games with Unity last I checked), UnityScript is slowly losing it’s market share percentage.
About the only user I am aware of that is highly active on these forums and still uses UnityScript is @ippdev . That said I do believe there is an active community of developers who still prefer to use UnityScript. They just aren’t bothering with these threads.
Its is likely that when the end comes UnityScript will be soft pulled, the same way Boo was. The buttons for making Boo scripts were taken away. The language was removed from the docs. But the compiler was left in. So a Boo script will still compile and run. And if you are willing to mess with it, you can still create new Boo scripts.
Technically Unity will accept anything that compiles down to compatible IL. I don’t see this face ever changing. So you could use languages other then C# if you really, really wanted too.
Speaking of IL, I doubt that UnityScript will survive the promised .NET/C# version upgrade. I really can’t see Unity spending any effort on implementing new features in an unused language. The version upgrade is likely to happen some time between next month and next decade.
But why will they stop supporting JavaScript?
It doesn’t hurt anyone to have JS support, it requires no maintenance…
But if they will stop supporting it all of the JS users will get hurt.
JavaScript is the main reason I chose Unity over Unreal Engine.
It’s because it’s not Javascript. Pure and simple. It’s UnityScript and they would rather put resources towards their engine then maintain their own language. (This is my speculation as Unity has not said anything official). C# is supported by Microsoft. UnityScript would have to be supported by Unity.
IIRC @superpig mentioned that it was starting to cause maintenance issues or holding them back from further optimizing stuff [or something] to keep the js stuff in Unity and they wanted to start phasing it out or stop maintaining. I can’t remember the specifics, but I seem to remember something official being said about it in the last ~4 months or so which basically point out that it’s going away in the future.
Yes, I think it hurts a lot to keep maintaining UnityScript. It’s really a mutation of Boo (or written in Boo), the third language Unity used to support. It’s madness maintaining API updates and fixes in more than one language, and costs both development and testing time, plus all the documentation which needs examples.
UnityScript has felt like it’s been deprecated for a long time anyway. People should already have switched when new tutorials became C# only. Half expecting a word filter that removes posts talking about UnityScript soon
As others mentioned, it’s not Javascript. I know Unity calls it Javascript, and “Javascript” appears over and over in the docs, and in the editor itself, but it’s still not Javascript.
Supporting UnityScript is not free. Anytime someone posts a JavascriptUnityScript question, someone has to spend the time to answer that question. That’s a time cost right there.
Supporting two APIs is costly in terms of development, features (if X can’t be added to one API, it probably shouldn’t be added to the other API for compatibility’s sake), and QA testing time. Each time Unity has a new release, everything must be tested.
Even if you were to just let the API “sit there” and add nothing, it still has to be tested for each update, and that significantly reduces QA testing time on their other preferred API, and therefore slows down each release.
Even if they said “Eh screw it” and stopped testing UnityScript and just let the API sit there, UnityScript users will still get screwed in the long term as unfixed bugs start creeping in, and (in terms of features) you are stuck with rusty bicycles made out of oversized wheels while everyone else is flying around in hovercars.
It’s true - we are looking to get rid of UnityScript at some point.
We’ve not made an official announcement yet because we’re still investigating some of the details. It’s not something we are doing lightly, and so we want to make sure we have really looked at everything fully before we talk about it. So, there will be a blog post soon, but please hold tight until then.