JS script future

Apparently there is no more auto completion for JS script in monodevelop. Is this a bug on my end or the beginning of unsupporting js?

I can learn c# with no problem, I used to code in c++ so it can’t be that different, but the reason I learned Unity with Java is because the whole documentation was pushing it as the preferred method. Since I see no gain or pros or cons in either language I chose JS to have a better experience with the docs. I like to keep things efficient.

UnityScript will slowly fade to obscurity over the next decade. The docs are now being written in C# first. I’d suggest switching as convinient.

Sounds like a wise suggestion.

If I may ask. Besides writing more code to achieve the same results, can you give an example of what we gain by using c#? I’m sure there are advantages, it would be nice knowing what they are to make the most of it.

In code terms C# is a little more strongly typed, which can help.

But the main advantages are the environment. There is a ton of support for C# out in the wild, both inside the unity community and outside it. There are existing libraries for just about anything. And the language is properly documented.

UnityScript doesn’t have most of this stuff.

2 Likes

All right, even though I never missed those things I guess that’s nice to have them.

I’ll make sure to start every new project in c#. But what I’m really dreading is to convert my huge current project to c#. Because not having autocompletion has been bothering me for a while. If you have any suggestions on that I’d appreciate it.

Converting is messy. It really depends how much longer you have to go on the project.

I’d suggest starting new projects with VS and C#.

It’s hard to estimate, but maybe 2 more years.

Isn’t VS a paid product? Why would I do that when monodevelop is free and comes with Unity?

The free version of VS also comes with Unity. And it’s a much better environment, at least for C#

Visual Studio Community is free for teams of up to five. It’s just another option rather than a replacement though with Mono now being owned by Microsoft it wouldn’t surprise me if we eventually saw Visual Studio on other platforms too.

1 Like

Oh! that’s nice. My installed version is an expired trial for whatever reason, so I thought that was the one that came with unity.
Maybe I can get js autocomplete on VS manually for the current projects.

Or if you don’t mind experimenting you could run your scripts through this. :smile:

http://www.m2h.nl/files/js_to_c.php

I personally don’t like VS, its load time is really long even on a SSD and i find it always has some error it has to correct to make it compatible with unity or something. Ive also experienced issues when working out of a drop box or another file sharing app, It does have some pros that Mono doesn’t like console at the bottom that tells me my errors before compiling the script, but all in all id rather just go for Mono develop.

2 Likes

Yeah, specially for my uses, VS brings nothing I would use but it comes with this load time that takes forever. The most fancy features I use is auto completion and syntax highlight; otherwise I could use notepad to code. But if I can make VS work with JS, at least for my current projects, that would be very useful.

I’m only seeing a load time of a few seconds at most. If anything it takes longer for Unity to generate a project prior to loading Visual Studio. I’m on a five to six year old computer too. Are you certain you have that SSD set up properly?

1 Like

Yea its set up properly, I’m using a Samsung 850 Evo SSD. I find the load times compared to Mono so drastically different.

Thanks for that link! I tested in a big script I had and it worked fine. I had to tweak a few things here and there, like add “new” in front of every constructor and some other pointless verbosities, but it works. I might be able to migrate to C# for this project still.

I have the same line of SSD (mine is the 512GB one). Mono is about two seconds here.