Should I try to learn C# Before trying Unity?

I have been trying to learn C# but without having someone to personally teach me its a bit hard because theres loads of stuff I just can’t understand … So I wonder if it would be better to learn C# from watching tutorials on how to make games with unity using C# since I know some explain what each thing does and such but still I wonder how effective that would be when it comes to the time when I am the one and only doing the games with no help…

1 Like

What materials are you using to try to learn C#?

Unfortunately if you’re just learning from the 'net it can be hard to know good tutes from bad if you’re just starting out. I’d strongly suggest going for a book instead, as then there’s typically at least some form of quality control.

As for jumping into Unity, it certainly can’t hurt. I still strongly recommend doing both in their own right, but there’s no reason to avoid playing with the engine and other tools just because you haven’t “learned to code” yet (which is something that you never “finish” anyway).

1 Like

Honestly if you have a strong base in other languages i don’t think you really need to try to learn C# to work with Unity because most of the C# you use with unity is Unity modified C# so I would definitely goto the learn section and look at some of the videos they have on scripting but i don’t think you are going to need to learn more than that. I learned C#, 1. Because it is very similar to Java and I have a strong base in java, 2. I watched all of the beginner videos, but what I think worked the most for me and helped me learn the most, was watching some Unity tutorials videos on Youtube. You may be different I learn by doing and no way else, but just find out what works for you.

I believe that each person has a different way of learning. Some learn better in a classroom with an actual teacher, others can learn well on their own by just reading books, while others prefer to learn visually by watching things get done on videos.

Personally though, I think that in order to create something complicated in any job (like making a game), you need to really understand the basics first. Basics are the foundation by which bigger ideas can be built upon. Great products are results of combinations of little things done right. In my own experience of learning stuff on my own, I found that it’s best to always work along what is being taught in the video or books and then experiment with what I’ve learned. For me, just watching and reading aren’t enough. There’s a difference between being just an observer and being the person who’s actually doing the work.

Fortunately, if you’re trying to make games as a personal hobby or as a way to make money, you can always have “cheat sheets” near you, unlike if you’re at school where having access to notes or books during exam time is forbidden. There’s no shame in not being able to memorize the syntax or certain formulas right away. We’re only human and there’s so much stuff that we need to think about.

I think that what’s most important is understanding the idea behind how games work instead of just memorizing stuff that you see in those video tutorials or books. For example, in a typical 3D platformer game, a person might think that the main character needs to be able to jump, so this person writes some code that allows the character to jump off the ground. After testing the jump ability of the character, the person realizes that the main character can still jump while in the air! Why is this so? It’s because the person did not consider at which state his character should only be able to jump. The person then writes up code that specifically tells the game that the main character can only jump if only it’s on the ground and not in the air. The problem is then solved. Not a lot of books will tell you that you need to limit the states that a character can only jump with, unless it’s specifically a book about making 3D platformer games. In other words, most of the time, you’ll have to solve your own problems or ask someone else who might have solved a similar problem that you just encountered.

From experience, I say that in order to learn something, whether it’s game programming, visual effects creation, or whatever else, you need to be open to a few things:

  1. Experimentation - it’s not enough to just copy whatever the tutorial shows you step by step. You need to fool around with it and see what you can do with it. If a tutorial shows you how to rotate an object horizontally, then try to rotate the object in other directions as well on your own. If a tutorial shows you how to spawn an enemy every few seconds, then try to make enemies spawn whenever you touch a trigger or whatever condition you want.

  2. Problem Solving - it’s near impossible to create a perfectly working functional game in just one go, even if it’s just the title screen you’re working on. Having problems pop up for almost every new code you write is to be expected. This is where your experience experimenting with what you’ve learned comes in handy. If you experimented with code a lot, you’ll have a better idea at what’s causing the problems and you’ll have a better chance of solving them.

  3. Expose Yourself to More Ideas - just like in other professions, learning is a continuous process. This is definitely very obvious in the world of video games. Different game developers have different ways of making things work in a game. For example, in the Batman Arkham series, counterattacks are done by right clicking the moment an enemy tries to attack. In Metal Gear Rising, counterattacks are done by pressing towards the direction an attack is coming from while also pressing the attack key. Same idea, different execution. No single book or video can cover every gameplay style that exists or will exist in the future. You’ll have to play them on your own to experience the differences or at least watch lots of gameplay videos. The more ideas you have on how to implement certain things, the more things you can experiment with, which increases your problem solving and game design experience.

Good luck and have fun. :slight_smile:

6 Likes

You don’t need to learn C# to use Unity, but if you want to become a better Unity developer, having a solid understanding of C# will be a huge bonus and increase your market value and confidence with the software. I’d suggest checking out the C# from scratch video tutorials on www.pluralsight.com. Once you’ve completed these beginner tutorials you’ll be well on your way to becoming a decent Unity scripter, as you get more familiar with the Unity API.

Not sure what you mean by ‘modified’ C#. The C# used in Unity has all the same language features for C# up to .NET 3.5.

Yep, including almost all of the standard library.

I recommend either finding a good book and reading it or follow along some YT videos. If you want to spend a little bit of money then I would purchase this…

https://www.udemy.com/programming-for-complete-beginners-in-csharp/?couponCode=NewsletterFeb2014

It will get you up and going quick!

I found these two sources helpful:

http://www.homeandlearn.co.uk/csharp/csharp.html

http://www.csharpcourse.com/ (the yellow book)

Using a visual scripting asset like Playmaker should go a long way in reducing just how much programming you need to know to make games in Unity.
When actually learning programming, the best method I’ve found personally is to first study up on the basics so you know how to actually do it, and so you have a solid grasp of at least most of what is possible with it (knowing, for example, what things like Loops and Arrays are, how you use them in that particular language, and what they’re primarily used for). From there you learn by doing, occasionally looking up answers to any questions you have as they arise. If you’re just starting out you’ll want to start with small projects and slowly work your way up to more complex things anyway, and that’s perfect for learning programming.

Well I’m learning pascal atm just for the basics will move to java really soon however I wanna learn C# for unity3d too because C# is from what I’ve heard its one of the most versatile languages for everything.

I also know the basics of C# since I’ve already been studying it for a few days, I know arrays, functions , classes (although poorly) and such thats why I didn’t know if I should move to unity since I know unity isn’t 100% like C#.

@Adeno ty man that actually helped a lot!

One question, why are you learning a dead language? I haven’t used Pascal since the early 90’s Bordland Delphi stuff.

If you want to make games, at least learn the likes of C and C++. Shaders generally are written in C and C++ is the core backbone of most commercial game engines, Unity’s scripting is an exception to the rule unless third parties have bolted mono on top.

You are much better off getting familiar with an API and learn the shear basics, Unity provides you with all the basics anyway.

http://unity3d.com/learn/tutorials/modules/beginner/scripting

I don’t think you need to learn C# before trying Unity. I am learning C# while using it and when I don’t know something, google is my friend. In game land, unless you plan on supporting your game for the long time, only three things matters: that game runs fast enough, is bug free and is fun to play. Quality of your code doesn’t mean too much, unless as I said you plan on long-term support for your game or unless it hinders game’s performance.

I’m learning just the basics of Pascal so I know what each thing does , what they for , etc… I started learning pascal as a way of being able to get into other languages easier since I already know the basics of programming

There is no real benefit to doing so, learn the basics of C and C++ which will go a long way.

well I wanna be able to make an MMO in the future and I believe the quality of the code really does matter in those since I’m guessing I’m gonna need to code a lot more stuff than just the regular 2d/3d singleplayer games. I wanna make sure everything runs perfectly with no fps issues

As I said, my advice doesn’t apply if you plan on long-term support of your game as it is case with MMO. But for regular, one-shot projects it is more than enough.

just goto www.unitypro.co.uk and follow some video tutorials at the same time making a game, it’s more fun that way and you get to see C# working with Unity’s Api

Are there any books you’d suggest I read?

I’m also interested in learning to program with C#

@RussianGravy The first book I would suggest is how not to necropost.

3 Likes