Programming Language

Hi i want to be a programmer for unity and specially in fps games. I have read trough some unity C# tutorials. But that was not too much. I want now to know what is the good sides of C# what is the language good in. Example is it good to script with c# when i go to make a weapon and a soldier shooting or is C# only good at menus. And i want to know if i want to learn C# to an advanced level do i need to search for UNITY C# tutorials which is not easy to get in internet or can i just search for C# tutorials and is that what they use in unity.


You can use C# for everything, and probably should. Any .NET tutorials will help. I’m at MSDN all the time. Note that it’s not exactly the same, but close enough 99% of the time.

Note that all the code examples in the manuals come in all languages (use the drop-down), and there are many scripts in the Unity script wiki which may help you.

The reason to use C# all the time, if you dare, is because if you want to mix it with Javascript, there are complications. C# is stricter, which means somewhat uglier code sometimes, but it’s more solid, a better programming practice in general. There are a few things you can only do in C#, and only one or two you can only do in Javascript, but those deal with convenience which can sometimes lead to sloppy coding, IMHO.

That said, I still use JS a lot for simple things.

For the last part, just general C# programming is fine (or not even C# – learn to program in any language.) Coding Unity is maybe 85% general programming tricks, and 15% knowing Unity. For example, save files work the exact, 100% same way in Unity as in regular C#.

Or, arrays are super useful. Unity has a few examples of using them. A general programming class, or website, can go over dozens of array examples, using them for a grid, or inventory, all the common errors, when to use a list instead… . And it all works the same in Unity.

I learned a lot about C# through XNA. It may be a good place to start and then come back to Unity. This is the book I was trained on. Check it out! Book

Aha ok good thanks for the help but if i want to script a fps game cant i do all the ingame job with the C# or do i need to learn myself C# and Unity Script.