Unity3d not using true Javascript?

I have have read a lot about which programmming launguage to use when starting out with Unity - I am planning to choose javascript as I am new to programming.

That said, a programmer friend of mine, who had a tinker with Unity, said that its unity doesn’t use true javascript - I am not a progammer so I don’t know what he means.

I need to know if Unity uses specific version of javascript because I want to get a book on learning it.

Or should i just go with unity script as I am a total Noob to progamming? I just need to start small…

Unity uses “UnityScript” which is like Javascript, but it’s not javascript.

For you? Learn C#. It’s a little harder, but in return you get more power. Plus it’s harder to make mistakes.

Thanks for that info.

What would I be missing out by going with Unity Script and not C#?

Lots of docs and resources. The start is easier but if you decide to be a programmer it’s more limiting.

I suggest getting some unity books [or free video tuts] and just spend some time making basic stuff.

Then once your happy with the engine make the decision on what language to focus on.

I started in US [because I came straight from ActionScript] but code almost exclusively in C#.

I would simply say go with c#. I use js myself but thats because I’m experienced in coding and just prefer to use it. C# is almost identical (needs a bit more fluff but you wouldn’t notice it much). Cos there’s more resources to learn c#

If I go the c# route - there a special section of begginner unity scripting tuts that relate to C# programmers?

I dont get why everyone belives that? i remember back when i first learned unity (2009 aparently) and the best resorce was the TornadoTwins tutorials and they only scripted in unity script, and all the general assets are unity script arnt they?

But in C# there is the MSDN, and an insurmountable amount of learn C# resources across the web.
While they will not always unity specific they can cover a more varied range of subjects.

Exactly.

I won’t go into detail, but I needed a very specific data-structure. I found a beautiful example done in C#, that comprised of thousands of LOC.

Imagine trying to build the same structure from scrap in US!

With US you are limited to unity, with C# you have an entire world of resources to use - It’s the difference between scripting and programming.

Not to say you can’t do most or all of the same in US - it’s just harder.

They are both equally programming. You can generally use C# functions in Unityscript, so rewriting existing code wouldn’t be an issue. @steam_bucky: Unityscript is written specifically for Unity, so many things that you encounter frequently are simpler and more direct. I use Unityscript in preference to C# when I can, though there are some more advanced cases where Unityscript isn’t feasible. Generally, go with what seems more comfortable to you. If you get into it, learn both; they’re more similar than different. While Unityscript is called Javascript for marketing reasons apparently, it’s a different language and web Javascript books won’t help much.

–Eric

I would argue that in practice you’ll find that one is used as one would a scripting language, while the other as a programming language scripting. At least based on what I’ve seen in the forums. I could be biased.

Guys, maybe I should have added I am a Mac user. From what I have read C# is windows thing? I guess I go the Unity Script route?

No, C# is just a language and has nothing to do with Windows or Macs.

–Eric

Um, don’t forget there is the entire internet which is full of C# resources, as opposed to only unity having unity js resources. I just shipped a game which only uses unity js, so my statement leans towards factual, rather than personal preference.

UntiyScript is closer to ActionScript than Web Javascript, and ActionScript is basically a lite version of C#/Java.

Honestly, it doesn’t make that much different, it’s like the Mac/PC preference, we could argue fine details all day but both get the job done.

When I started using Unity I used UnityScript as I was an Actionscript/Flash programmer before that, and a Lingo programmer before that /hi-fives the fellow director castoffs in the room/ but have since switched to using C# which is closer to what I started programming with, pure Java. At the end of the day they’re called “different languages” but really it’s more like “different accents”. I reckon UnityScript has a kind of Northern Irish brashness to it, C# is more or a reserved Anglo-German feel, textured but a wee bit stuffy - Lingo would have to be balls-to-the-wall Aussie cockney all the way.

Or you could always use Boo. He’s like the crazy Indian dude in the corner no one can understand but you just know he’s a freakin genius.

:smile:

I tried learning both, and found learning C# to be a much better experience.

Plus you can take that knowledge to other engines in the future more easily…

Does US run WCF/ASP.NET, Console apps or Win Forms? What about Photon and Player.IO?

I do agree it gets a job done. But if one wants to take programming seriously to deny oneself entire other ecosystems for a few trivialities such as not having to declare your class…

Nothing wrong with ‘scripting’ - that is to say knowing just enough to manipulate Unity - but I personally like the ability to relegate it to nothing more than a fancy GUI and some helpful libraries. [No jokes, I integrated an entirely separate C# physics engine in just for laughs].

If I go the c# route on the Mac, is there any specific sites or books for the noob you advocate?

You don’t use things like Win Forms in Unity.

That’s fairly absurd. It’s not like learning Unityscript means it’s burned into your brain as the only language you can ever learn. Nothing will ever stop you using C# elsewhere if you need to (or in the same Unity project, for that matter). But when you’re programming thousands of lines of game code, those “few trivialities” add up to a lot. Enough with the snooty language nazism please.

–Eric

Out of curiosity, is this (JScript .NET - Wikipedia) what US is built off of?