Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Best Way For A Beginner To Learn C#...

Discussion in 'Scripting' started by Deleted User, Oct 2, 2014.

  1. Deleted User

    Deleted User

    Guest

    I have dabbled in C++ but never dived to deep and i'd like to see if Unity is right for me to make 2D games.

    In your opinion, what's the best tutorials/books/videos to learn Unity Scripting?

    Thanks for any input
     
  2. Suddoha

    Suddoha

    Joined:
    Nov 9, 2013
    Posts:
    2,824
    What exactly did you learn in C++? / How far did you get?
     
  3. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,514
    There are countless numbers of blog posts on the internet about this very topic.

    There are books you can read about development in Unity and introduce you to how to do it.

    Unity is... FREE... and available to download as long as you can get on the internet and have the appropriate hardware to run it.

    Why not go out and try to figure this out for yourself in. It'll take less time then to wait for us to explain our own personal experiences to you, then you to come read and parse them for the information you're looking for, to end up with less knowledge than if you had just done the first 3 things I described.


    tldr;

    RTFM!
     
  4. Chris11

    Chris11

    Joined:
    Sep 26, 2014
    Posts:
    9
  5. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
  6. Deleted User

    Deleted User

    Guest

    Not far. Did the hello world and made a tic tac toe, but work got in the way and the learning fell by the waist side.
     
  7. Deleted User

    Deleted User

    Guest

    When it comes to blog posts, books, articles, some are better teachers than others. Saying it's for beginners and then delving into code that blows right over your head, frustrating you and making you to stop learning. Or bloating the pages with irrelevant info.

    I never asked for personal experiences, only what are some good books, posts, etc etc to learn. There are litteraly thousands of tutorials & lessons out there and since i'll be trying to learn unity, what better place to ask for an Opinion on what may be the better of the heap.
     
  8. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,514
    Yep, and this question is asked every day, on every programming forum I've ever been a member of.

    And when I said there are blog posts. I didn't mean tutorials. I mean actual blog posts covering the specific question of "where to start". Offering up pretty much the same exact answers you'll receive here, in a more timely manner.

    example... I just googled your title to this thread:

    https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=unity best way for a beginner to start learning C#

    First 3 results are Unity Answers pages with Unity users offering up links as answers to the very questions. Next results after those are books, videos, and other things, for you to start with.

    If you google any kind of version of "unity beginner" "unity tutorial" "unity learn to code", etc

    https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=unity+beginner+tutorial

    Within the first 3 results you get Unity Learn:
    https://unity3d.com/learn

    Which is the very answer that you received from Chris11
     
  9. christinanorwood

    christinanorwood

    Joined:
    Aug 9, 2013
    Posts:
    402
    Resources become dated. New ones appear. Yesterday's answer may not be the best for today. It's a fast moving world.

    Case in point - a couple of months ago someone enquired about a good resource for learning to create educational games. I was able to recommend a book on that very subject that had only just been published. A bit specific I know, but the point is still relevant.
     
  10. Vipsu

    Vipsu

    Joined:
    Oct 8, 2012
    Posts:
    88
    It depends how you like to learn things, if reading a book and playing around with it's tasks until you learn the subject seems like boring and unproductive then you probably are like me and prefer to learn things by doing things.

    Then you can just start by making small games in unity, maybe watching few of the beginner tutorials to get around stuff.

    If you want to save time (a lot of time) you should at least learn:
    - basic variables and arrays
    - conditionals
    - loops like for and while, (for-each is slow and rarely if ever better than basic for loop)
    - value and reference types

    After few smaller projects and/or when you have gotten your head around the above:
    - Basics of object oriented programming (Classes, Objects, inheritance, interface, singletons + static values)

    But probably the most important thing is to keep the projects really small in the beginning, and by this I mean starting developing games that are on the level of pong, snake or pac-man in terms of simplicity. Work your way up from there and you will be a lot less likely to get frustrated and thus learn faster (and get games actually finished).
     
  11. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    I'm using "Microsoft Visual C# 2012 Step By Step" by John Sharp.
     
  12. Deleted User

    Deleted User

    Guest

    Thanks for all the replies. I am one that always likes to figure things out for myself. Google is a close friend of mine.

    Again, i asked for opinions on unity cause maybe you have come across some that were better than others. Instead of wasting a few hours or a day going through the tutorials to end up learning something that is dated or just plain wrong, i thought of getting some opinions straight from unity users. And yes, i'd rather learn by doing than by reading.

    I just downloaded unity and can't wait to dive in. Hopefully this ole dog can learn some new tricks.

    Thanks again for all the input.
     
  13. Vipsu

    Vipsu

    Joined:
    Oct 8, 2012
    Posts:
    88
    This is a good read for everyone working with Unity, it's good to know the basics of Unity Editor before dwelling too deep in to the article tho.

    http://devmag.org.za/2012/07/12/50-tips-for-working-with-unity-best-practices/

    Unite conference videos in the YouTube have also been very enlightening and slightly more interesting than just reading some tutorial.
    https://www.youtube.com/channel/UCG08EqOAXJk_YXPDsAvReSg

    Mike Geig's Tutorials are pretty good as well, happy to see him making tutorials for unity as I literally started Game development from his excellent 2D Game development tutorial.
     
    Last edited: Oct 2, 2014
  14. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    Nice links. Thanks.
     
  15. Deleted User

    Deleted User

    Guest

    Hey thanks for the links Vipsu & thank you everyone that replied.

    Learning Unity2D & C# will be slow going (i work about 12hrs a day at my slave job & i'm a single dad of 2) but i reall need the freedom Unity can bring, as opposed to the restraints of the other way i'm making my game now.

    Again thank you
     
  16. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,609
    Jump in the water with the sharks and learn to swim. That's how I always do things.

    Just start trying to make something simple. You'll be way more motivated than just trudging through tutorials or reading code. When you hit a wall, search for an answer. Someone's likely asked that question before. Rinse and repeat. Before you know it you'll be there.
     
  17. Deleted User

    Deleted User

    Guest

    Thanks for the replies.

    What are the things i should be focussed on? I know i must learn things like:

    Arrays
    Classes
    Variables

    Any others?
     
  18. willemsenzo

    willemsenzo

    Joined:
    Nov 15, 2012
    Posts:
    585
    Additionally I would say take a look into the unity functions GetComponent and AddComponent because the most asked question here is: how do I access a variable in another script? For me personally the programming itself wasn't the most difficult/time consuming part, getting familiar with the API took more of my time.

    Some other classes/variables to look into: Transform (class) and transform (variable), GameObject (class) and gameObject variable. These are being used a lot and it's good to know what their role is.
     
  19. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,609
    Obviously you need to know the basics of the language and the basic concepts behind programming in general. The ones you listed plus other super fundamental things like functions, loops, ifs, generics, comparisons... but it's not really helpful to make an exhaustive list of those things. If you're unfamiliar with those, just go though a basic C# reference somewhere. You certainly don't need to know everything in the beginning. You can save more advanced things like delegates, events, Linq, properties, interfaces, abstract classes, etc. for later. As willemsenzo mentioned, you'll probably be spending more time learning about the Unity API than the C# language itself.
     
  20. christinanorwood

    christinanorwood

    Joined:
    Aug 9, 2013
    Posts:
    402
    I have a few YT tutorials on basic programming in C#. Aimed at new Unity developers but it doesn't actually use Unity. Some people have found them useful.

     
  21. Deleted User

    Deleted User

    Guest

    Thanks for the replies.

    I have looked at a few C# video lessons but they seemed more for those that want an exhaustive teaching of that language.


    I know C- in general is an expansive language & i didn't want to spend a huge amount of time learning the things i may never really need for Unity.

    Thanks christinanorwood for that. Will check that out.