True, but you can certainly use it and the others I mentioned to help make Unity Games.
True, I learnt it first
Hehehe, Okay I’ll stop poking sticks. Though I would point out I do love languages, I’ve experimented with VB, C#, JS, AS, US, XML, HTML, CSS, Erlang, Lingo, SQL etc.
If you don’t use windows you can’t use Visual studio or WinForms IIRC.
So I’d pick tutorials that focus on console applications and .NET 3.5 or earlier. Though do double check - as that’s off the top of my head and I’m not putting $ on the accuracy of it. Google might be able to help.
so basically you cant use .NET classes in US, e.g you don’t like Unity’s Player Prefs and you want to save by writing a file, you can use C#'s SystemIO.file and write your own save file, in US this isn’t an option. but everything you need is usually built in to Unity(Player Pref, GUI, etc). C# just give’s another option. i personally learnt C# by Burzerg’s hack Slash tutorial, not the best option, YouTube has 100’s of C# tutorials/lessons. MSDN and sometimes the Unity docs is a good place to refer to C#.
My suggestion: First learn basics of C# and programming in general before ever doing a single line in Unity3D. Once you got a basic understanding and could write some smaller apps, you should come back and try to make a game.
Trying to learn make anything in Unity3D without ANY programming experience at all is just plain wrong and you’re doomed to fail or have horribly ugly looking (and maintainable) code. There are just too many people around here and on Unity Answers who just ask the most basic things about programming and honestly, most of the people here are not to teach you how to do the most basic programming (there are enough resources on the internet for this) but to help you with Unity3D specific problems.
For someone who doesn’t know a single thing about programming, there is much more C# stuff to find around to start with it than UnityScript. You can’t really apply many of the JavaScript tutorials to UnityScript, simply because JavaScript UnityScript have little in common other than the syntax and even this one is quite different.
Many people also say Visual Basic is easy, but actually it’s much harder when it comes to syntax, the code is harder to read and most of the stuff that’s done easy in C# is comparably hard in VB (That’s coming from someone who did Basic, C++, Pascal and VB before C# was released). It’s by far the easiest language for programming.
VB has much easier to read code for beginners than C#.
Parentheses are ugly messy things that a lot of counting to what would otherwise be simple code.
Once you get used to programming, and the parenthesis they make life beautiful and clean [well sometimes anyway], but as a beginner they are the devils own spawn.
My suggestion is the pure opposite. When youve never programmed before then grab UnityScript, grab Unity, and start to develop. To actually try to develop something is the fastes and most efficient way to learn. You have chosen Unity to have an easier and faster workflow, and to make games. So why leave it and work with a C# ide for months first, producing non game content that you dont really want and need?
Inside Unity you can do the same things with US and C#. The result runs at the same speed too. So the choice is more a thing of flavour, you miss nothing, no language is really “better” than the other. The point is, it makes no sense to learn US when you already know C#. That`s why C# in Unity exists. Not because it is any better. In Unity Unity Script is a bit better documented than C# though, it is much easier to understand for non programmers, and most thing can be easier and shorter written than in C#.
@Tiles:
Because that what many newbies try to do and horribly fail. Instead of learning how to program, they make broken code, post it on Unity Answers or here and as others to fix them and some of them are beyond of the realm of being “fixed” without a complete rewrite.
It’s just impossible to write good and stable code if you have NO experience at all. You may get simple things like moving a character or rotating but once things get more complex, then code done by a complete newbie to programming will become unmaintainable. That’s a fact. Whoever writes his first 2-3 Apps will find dozen of design flaws, errors and mistakes in them which at one point makes it impossible to extend this piece of code without scrapping everything and starting from scratch.
This will become very frustrating to everyone who newly starts with Unity3D and has NO PROGRAMMING experience at all and then they’d just give up. In order to write good, stable and maintainable code you just need months or years of programming experience (depending how good of a learner you are). Only then people should start writing stuff which they plan on to publish.
Just throw out a look at answers and you’ll see that there are people who don’t even know the most basic stuff about programming, like handling of member and local variables (in fact, a huge part of them can’t even use/read the documentation…). I’m sorry to say, but this people just shouldn’t touch Unity3d programming until they got the basics of programming and OOP. To many people just assume that everyone can do games in Unity, which is plain wrong. Even though Unity3D makes it like 100 times easier to develop a game, you still need a GOOD understanding of programming and software development to get anything half looking good with Unity3D.
Don’t wont to destroy the bubble of all that new people who think they can make a good game with Unity without any programming knowledge, but that’s how the reality looks like. Telling them to start straight of learn programming AND learn unity it’s 3D stuff, is like telling someone to migrate to the USA and start as dishwasher and they eventually may become millionaire. While technically possible, it’s highly unlikely, especially in times like we have it now.
Just learn C#. It’s a first-class, real language used by millions of people. It has a standard, and there are literally millions of pages on the internet where you can learn, and many multi-millions of developers that are solving problems and posting their experience every day. Yes, you may need to occasionally type an extra line of code here or there, but in the end you have more control over what is happening and that can be helpful on larger projects.
And you think they don`t fail a the harder solution when they already fail at the easier solution? Please. The only difference would be that they post their broken code at a C# forum then instead
To learn a language you have to use a language. This is true for real life, and this is also true for programming languages. You will of course talk nonsense in the beginning. But that is where every learning begins.
No, if they start by learning the basics and OOP the chances to fail are much lower. When you make smaller Apps or just test/improve your understanding you don’t write stuff you gonna release on other people.
But if you have a half done game with crappy code, the only viable solution is to scrap it and start over, which has a high frustration factor. However, if you start programming and notice that you already suck with the “basics” you can quit early enough without wasting months of trying to get a working game with copy paste code from 1000 different sources. Not everyone has ability to be a programmer, if they would the programmer profession would be obsolete.
And just giving newbies a false hope that they could accomplish something noteworthy is just plain wrong. There is a chance that a complete beginner to programming could get something good and halfway clean and working code, but the chances are very low and they will just waste their time. And that’s true for all professions. You can’t become good at Marketing just by trying, you need to learn the basics first. You can’t become become a bank director without trial and error, without having a degree in economics.
It’s like people who use jQuery and think they can do JavaScript. Hilarious.
And you think a MMO kid is going to build SMALL apps in C#?
Also in Unity you have to start with the basics first when you are a rookie. You can do smaller apps in Unity too. And you have in fact to start with small stuff and the basics, no matter if you use Unity and its Javascript, or C# inside or outside Unity.
The learning process itself has absolutely nothing to do with the environment. You will do the nearly same amount of errors. You need to restart a crappy C# app from scratch too. You will find yourself trapped in rewrites. And you will of course also first try to grab your mentioned 1000 different sources to try to achieve what you want. Thats simply part of the learning process. The difference is that with C# and outside Unity the frustration factor is ten times higher. Because you learn boring and dry stuff that doesnt even point in your needed direction, and which you will most probably never ever need in your game. And that`s wasted time and energy.
To stay with your analogy, you don`t need to learn to be a factory president to become a bank director.
As told, in Unity you can do the exact same things with Javascript and with C#, with the exact same results. You can learn the language in Unity too, no matter if C# or Javascript. And when you want to make a game in Unity only then there is no need to learn outside of Unity really.
Except for create anonymous delegates, or use LINQ, or use Events, or +=/-= delegate syntax, or (at least didn’t work in 3.0) assign a char via single quotes. Or use a proper IDE (Visual Studio/MonoDevelop) with Intellisense/DocFood/Code Completion and integrate Doxygen documentation seamlessly(as a Unity editor menu button), or receive help from anyone not using Unity.
And on this point I couldn’t agree less. That sort of introspective focus is only going to get you stuck. If Unity doesn’t provide an AI solution, you need to look externally. If you want a shader that’s not built-in, you need to start learning how to make proper shaders, most commonly externally (the number/quality of CG tutorials compared to Unity shader syntax tutorials is pretty drastic). Any time you want to grow, or create something that is not just a rehash of an existing Unity game, you need to look elsewhere, and being able to broaden your available sources (many people on here seem to think JS can’t use the standard .NET libraries, and completely ignore the MSDN) you are shooting yourself in the foot, and closing doors.
You can learn using only a proprietary language in a singular engine, but being able to utilize more resources, more tools, and have more capabilties, is nothing to scoff at, and being able to go anywhere online for your programming assistance/learning compared to being jammed onto the Unify wiki and Unity Community can make a huge difference in actually learning programming and not just trying and failing with little help.
EDIT
To shorten, the more resources, the more available assistance, the more tools, the more tutorials, the more likely you are to succeed. And while you can make do with less, you end up having to do more to break even.
I love how everyone is saying the opposite of everyone else. The takeaway here is: don’t listen to anyone, they are all wrong (including me).
There’s actually a reason for that.
var someString = '"Well," he said, "here we go again."';
vs.
var someString = "\"Well,\" he said, \"here we go again.\"";
Which one is easier to read? Of course, the tradeoff is:
var someChar = "X"[0];
vs.
var someChar = 'X';
Overall I’d rather have the single quotes for chars and deal with escaping double quotes in strings, but I can’t deny there have been occasions when not having to escape quotes is quite nice. So as usual it’s not a black and white issue.
Wait, are you saying that JS uses single quotes for strings?
Granted, I never use it, only read others, but I coulda sworn it was:
var someString = "This is a String";
I figured out the char literal trying to provide an example for someone, but I’m now curious the JS difference between ’ and ".
Also for the char example if you need chars in any sort of tight loop that could hurt. You’d need to A) create a string (~20 bytes + 2 bytes per char) which will require garbage collection, and then copy out a single char for use.
Although this one I could just get upset about it because I’m used to C-C+±C# where I feel some syntax should just be consistent.