Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Finally, an interactive tutorial series that WILL teach you C# for Unity3D

Discussion in 'Community Learning & Teaching' started by SubZeroGaming, Mar 25, 2013.

?

Would you like to see more c# Interactive tutorials?

  1. Yes

    1,401 vote(s)
    98.9%
  2. No

    15 vote(s)
    1.1%
  1. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    I currently still offer private sessions that give you 1 on 1 access to the premium courses designed for DGI. You can find the rates on my signature.

    Best,

    Jon
     
  2. Sprecic_Anes

    Sprecic_Anes

    Joined:
    Jan 7, 2014
    Posts:
    1
    Amazing tutorial. You have changed my way of thinking and approaching a problem. Other tutorials had me confused more than I was confused before, but this is just great. I recommend this to every beginner out there. As long as you keep making these, I will keep watching them. Thank you for opening eyes to this young soul who was lost in a complicated world. Many thanks.
     
  3. jrothfork

    jrothfork

    Joined:
    Jan 9, 2014
    Posts:
    1
    I'm absolutely in love with your tutorials. To be honest I've never touched C#... I've always wanted to learn how to program, and I've been taking the online Udacity classes so I've had some exposure to Python at least. To be honest I was convinced (before I started your tutorials) that they would be a nightmare to follow along since I don't have much experience but it's actually all been great so far. Keep up the good work!
     
  4. nightbane30

    nightbane30

    Joined:
    Jan 17, 2014
    Posts:
    25
    All I have to say is, you are amazing. I came into this with barely any knowledge of C#, and I gained a whole lot more info in 20min than I ever have in my whole entire life. Subscribed, favorited, liked, everything. Thank you very much, and please continue to help others like this.
     
  5. gamer_pest

    gamer_pest

    Joined:
    Jan 24, 2014
    Posts:
    2
    this is better then the tutorial from unity. however I have only the basic version, while I haven't been through all of the tutorials, I notice that you have the pro version. does it compensate for someone who only has the basic version of unity?
     
  6. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    You're very welcome :)

    Thanks for watching!

    I'll try my best. Thanks for watching! :)

    Of course :) I don't utilize any of the Pro features at the moment. Everything done in my videos can be done with Unity free. I switch to Unity Free mid way through the videos.

    Thanks for watching!

    Best,

    Jonathan
     
  7. PatrickHedges

    PatrickHedges

    Joined:
    Oct 6, 2013
    Posts:
    4
    Thanks for the videos. Looking forward to DGI.

    Below is a screenshot of the game I've been working on to test different concepts.
     

    Attached Files:

    Last edited: Jan 27, 2014
  8. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    Excellent work, Patrick!

    Glad you enjoyed the videos.

    Best,

    Jon
     
  9. georetro

    georetro

    Joined:
    Jan 18, 2013
    Posts:
    218
    This is a great series. Its the first one that I have found where the person has actually challenged you! Keep up with the excellent work. May I ask when will your next video be out and what can we expect for the future?
     
  10. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    I've been asked by Apress Publishing to write the next C# for Unity3D book. As I write that, I'm still developing Digital Gaming Institute, an online training website.

    I've been meaning to release another public tutorial series for some time, and I don't want to give any false hope, so I don't have an ETA on the next YouTube one. I'll do my best to try and get one out soon.

    Best,

    Jon
     
  11. georetro

    georetro

    Joined:
    Jan 18, 2013
    Posts:
    218
    Don't worry :) Thanks for everything, I have learnt a lot from these tutorials. I have done coding in the past: Python and Javascript, but this is the first language where I have been able to figure out the code first without being told.
     
  12. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    No problem. I'm glad you enjoyed the videos. Be sure to follow me on twitter @DGIStudents or subscribe on http://digitalgaminginstitute.com for release information. I also started a Facebook page that people have found, but never advertised haha. Feel free to find me on there as well.

    Best,

    Jonathan
     
  13. Angellify

    Angellify

    Joined:
    Jun 1, 2013
    Posts:
    15
    Hi.Thanks for the tutorials, they really helped me with understanding C#.Usually all the tutorials are like:
    Follow along, alright?I type that, you type that and at the end you (or at least me) will be confused...
    But with your tutorials I actually managed to get something from the first lesson.Know I know how to make a menu, character movement, RayCast, Inventory....thanks a lot.

    Edit:Are you going to make more tutorials like these?
     
  14. georetro

    georetro

    Joined:
    Jan 18, 2013
    Posts:
    218
    I know you haven't finished your website yet but is the course going to be $349.99 or is that because you haven't edited all of the wordpress theme? Don't worry I am just inquisitive
     
  15. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    Yup. Working on a training site now.

    DGI is in development still. I removed the coming soon page to allow me to update the site. The operation of DGI has not been 100% decided, so i'll be releasing more information as I get closer to a release.
     
  16. georetro

    georetro

    Joined:
    Jan 18, 2013
    Posts:
    218
    Thanks for the reply :) You've helped me and so many others out so don't feel rushed!
     
  17. Rebekiusa

    Rebekiusa

    Joined:
    Feb 7, 2014
    Posts:
    2
    This is sooo great. Just what I was looking for. THANK YOU VERY MUCH!! :D
     
  18. nightbane30

    nightbane30

    Joined:
    Jan 17, 2014
    Posts:
    25
    Hm, I can't figure out this issue. Can you help? Whenever I press the space bar for the first time during the scene, the laser instantiates in the center of the screen. The prefab also seems to "lag" a bit when following the cube, like it won't center in the middle of the cube quick enough for its speed. Here's a test scene so you can see what I mean: https://dl.dropboxusercontent.com/u/261955553/bug test scene.html
    Yes, I know the wrap is a little messed up, but that's because I'm not making it for a web build XD

    Here is my code as well for the player script.

    using UnityEngine;
    using System.Collections;

    public class Player : MonoBehaviour {

    private Transform myTransform;
    public int playerSpeed = 5;
    //variable to reference prefab
    //prefab = gameobj(reusable over and over)

    public GameObject Laser;
    private Vector3 position;

    // Use this for initialization
    void Start () {


    myTransform = transform;
    //spawn point
    //coords at -3, -3, -1
    myTransform.position = new Vector3(-3, -3, -1);

    //variable to reference prefab
    //prefab = gameobj(reusable over and over)

    }

    // Update is called once per frame
    void Update () {

    //
    transform.Translate (Vector3.right * Input.GetAxis ("Horizontal") * playerSpeed * Time.deltaTime);

    //want to make a wrap
    //if the player hits -7, go to 7
    //if the player hits 7, go to -7
    if (myTransform.position.x >= 12) {

    myTransform.position = new Vector3 (-12, myTransform.position.y, myTransform.position.z);

    } else if (myTransform.position.x <= -12) {
    myTransform.position = new Vector3 (12, myTransform.position.y, myTransform.position.z);

    }

    //we want to fire a laser when the player presses space bar

    //if the player presses space, a laser will shoot out
    if(Input.GetKeyDown(KeyCode.Space)) {

    //fire projectile
    //we want to initiate our prefab
    //use Instantiate method
    Instantiate(Laser, position, Quaternion.identity);
    //this instantiates our laser prefab
    //next tut: we want to position our laser wherever our player is
    position = new Vector3(myTransform.position.x, myTransform.position.y + 1, myTransform.position.z);


    }

    }
    }
     
  19. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    Thanks for watching! :)

    hm,

    It seems like you aren't setting the position of where you want it to spawn till after you instantiate it. Try placing your position variable above the Instantiate method.

    If the error still occurs, you can send me a private message for additional help.

    Best,

    Jonathan
     
  20. nightbane30

    nightbane30

    Joined:
    Jan 17, 2014
    Posts:
    25
    Thank you! I usually work with web languages, and most of them don't usually need to be in order of what the code is doing. Apparently C# does!
     
  21. onij

    onij

    Joined:
    Sep 20, 2013
    Posts:
    8
    Jonathan, How is the book coming along? It is interactive as well? And do you have an ETA of when it will be available?
     
  22. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    Hi Onij,

    The book is coming along well! And of course, the book will be highly interactive coving many meta projects and one major one. I can't specify an exact date, but come june, 2014 we'll be coming close to launch.

    Best,

    Jon
     
  23. EverettS.

    EverettS.

    Joined:
    Apr 29, 2014
    Posts:
    2
    Hey Jonathan, I just recently stumbled across your list of tutorials and saw a couple. My background in programming consists of mostly basic programming from a website called byond.com (although not a very great place, I do thank the site for introducing me to programming and some awesome people). My point being that the tutorials are extremely helpful, especially since I just got the program a few days ago (I didn't know where to start!). I haven't gotten a chance to check out all of your videos yet, but do you happen to have one where you teach how to do simple animations correctly? I have been having a hard time figuring this out. If not, could you point me towards the right direction?

    Much appreciated

    -Everett
     
  24. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    Hi Everett,

    Thanks for the comment, and as far as simple animations go, can you elaborate a little more? To create simple animations, you can use the Animation Editor inside of Unity. To read about how to use it, you can check out this link: https://docs.unity3d.com/Documentation/Components/animeditor-UsingAnimationEditor.html

    If you're talking about you have a 3D model or 2D sprite, and want to animate it, I do have a tutorial series coming out that will feature the new Mechanim animation system. You can follow on Facebook for information. Click the link from my site. http://digitalgaminginstitute.com

    Best,

    Jonathan
     
  25. Ekanaut

    Ekanaut

    Joined:
    Mar 29, 2013
    Posts:
    1
    Hey Jonathan,

    I've been a game artist for a long time and I could never really get into proper scripting/coding. Your tutorial series was the "A HA!" moment for me to learning C# two months ago and I've been making small games in Unity since then. Most recently, I got enough courage to take part in the solo 48 hour Ludum Dare Game Jam and I made this. http://www.ludumdare.com/compo/ludum-dare-29/?action=preview&uid=33699 Thanks for inspiration and your way of teaching. I've recommended this thread to anyone that wants to learn C#.


    Cheers,

    Eka
     
  26. EverettS.

    EverettS.

    Joined:
    Apr 29, 2014
    Posts:
    2
    Hey Jonathan,

    I was referring more to the latter! Sorry for not being too clear on my question. But thanks for the info!

    -Everett
     
  27. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008

    Hi Eka,

    That's fantastic! Awesome job! I'm glad my videos were able to give you a helping hand!

    No problem. Best of luck!!
     
  28. Jnanda313

    Jnanda313

    Joined:
    Jun 1, 2014
    Posts:
    21
    Hello Jonathan, as a person who has no prior knowledge to programming or game development i find your tutorials extremely helpful and clear. I would love to purchase your book when it is complete and once again thanks for the amazing tutorials!
     
  29. Aeanis

    Aeanis

    Joined:
    Jun 14, 2014
    Posts:
    2
    Watched your first Video and understood it immediately. Nice work, can't wait to watch the others :D
     
  30. Zhainne

    Zhainne

    Joined:
    Jul 2, 2014
    Posts:
    11
    Ok I've watched the first and 2nd video and I understood most of that but the only thing i don't understand is how do i know when to use " " , = . ( ) Like I remember

    public int playerSpeed = 10;

    transform.position = new Vector3(x, y, z);

    transform.Translate(Vector3.left * Input ("Horizontal") * playerSpeed * Time.deltaTime);
    transform.Translate(Vector3.back * Input ("Vertical") * playerSpeed * Time.deltaTime);
    (I believe i got everything above correct)

    and

    void OnGUI() {

    GUI.Box(new rect(150, 150, 150, 200), "Blabla");
    if (GUI.Button(new rect(170, 180, 20, 50), "Blabla")
    Debug.Log("Msg here");
    }


    I actually can't believe I remembered all that o.o I was doubting myself i guess haha. But it still stand that I don't know when I'm suppose to use periods, commas, (), *, -=, ++, etc. Is there a section that goes in to detail about this?

    Edit: just realized I forgot a few things ^_^
     
    Last edited: Jul 6, 2014
  31. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    Hi Zhainne,

    1 rule to remember is that for every open parenthesis, you need a closing one. Same goes for the closing braces.

    When I'm programming, I will use the tool tip that Monodevelop shows you.

    When you type: transform.Translate

    The tool tip comes up with syntax for what's it's asking. It says (Vector3 translation)
    That tells me that i need a parenthesis, and a vector3 translation to pass through. Then close it with a parenthesis.

    Same for setting a new position. The tool tip tells me i need a parenthesis with x, y, z values.

    As you gain more experience, you'll catch on. The scripting reference when I'm programming tells me the required parameters, so I read it and apply them accordingly.

    Hope this helped.

    Best,
    Jon
     
  32. Zhainne

    Zhainne

    Joined:
    Jul 2, 2014
    Posts:
    11

    So pretty much as I'm typing the code in it should tell me what I need? Does that go with periods and commas? Sorry I don't catch on to things easily and I've always wanted to make my own game. Right now I'm following a tutorial on making my own RPG because those are the games I'm mostly interested in but the programming req to do it is extremely over welming considering I can bearly remember the three codes in the first two videos. But I'm not giving up. Can't get anywhere in life by giving up.

    My main thought while following this RPG toturial was to just follow him all the way through and by the end just customize it to make it my own but sadly I'm not even sure I'll be able to do that. Its just gotten a little overwhelming lol. I think I should pause the RPG game till I have more knowledge in programming. Sry for the rant o.o
     
    Last edited: Jul 7, 2014
  33. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    No worries.

    An RPG is very advanced to compete. I recommend completing my series and then moving on to smaller projects. Building up your knowledge of C# and Unity before taking on an RPG.
     
    Zhainne likes this.
  34. Zhainne

    Zhainne

    Joined:
    Jul 2, 2014
    Posts:
    11
    Yes, will do. I'm on the space shooter ep 3 or 4. I've already learned more then what I had. Thx for the tutorials. Now if only I had sponge like properties so I could just soak all this in easily, I'd be happy haha.
     
  35. Zhainne

    Zhainne

    Joined:
    Jul 2, 2014
    Posts:
    11
    So I ended up putting
    Code (csharp):
    1. if ( myTransform.position.y > 8) {
    2. Destroy (gameObject);
    3. }
    It's different from yours but it still worked. Is there a difference? Also the new reference page looks different from when you made your videos so I'm not sure how to work it lol. The search area doesn't seem to go to where i need it to go.
     
  36. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    That code is correct. The scripting reference was updated in the new 4.x release. You will need to make sure that you're in the scripting section of the manual and then begin your search. The search is very specific, so if you spell something wrong, it won't return any search results. You may be better off typing it in google, and then having google link you to the correct scripting reference for what you're looking for.

    Best,
    Jon
     
  37. FijianW4rr1or

    FijianW4rr1or

    Joined:
    Oct 7, 2013
    Posts:
    1
    Thank you so very much for making these videos
    really appreciate it
     
  38. onij

    onij

    Joined:
    Sep 20, 2013
    Posts:
    8
    Are there any updates on the book? How about the website?

    Patiently waiting for awesomeness. :)
     
  39. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    You're welcome. I think a new video will be coming out this evening to get back into video making!

    Hi Onij,

    The book is due to be released September 3, 2014. :) And the site is coming along well. Working with local partners to help create a gateway to creative careers.

    Best,

    Jon
     
  40. Jnanda313

    Jnanda313

    Joined:
    Jun 1, 2014
    Posts:
    21
    Hey John if you are still continuing to make more video tutorials could you please do one on character controllers (maybe a 2d one to keep things more simple)? I think that will help many people. Thanks in advance.
     
    SubZeroGaming likes this.
  41. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    In the 2D series, we'll be covering a very simplistic one that works great!
     
  42. onij

    onij

    Joined:
    Sep 20, 2013
    Posts:
    8
    Yay! Thanks! I was hoping that it was still in progress. I'll be the first to buy it. Will it be available on Amazon.com, or only on the publishers website?
     
  43. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    From what i'm told, it will be on Amazon, Apress's website, and barnes and noble online.
     
  44. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    New Tutorial released! GetComponent and class inheritance in Unity! Getting back into interactive content. New 2D series starting soon!
     
  45. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    New 2D tutorial series started today! Video uploading now. Link is live, just waiting for publish!

    Best,

    Jon
     
  46. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    New 2D series updated and a new misc. content video going over a universal health system!
    Enjoy!
     
  47. Turtlicious

    Turtlicious

    Joined:
    Aug 4, 2014
    Posts:
    1
    Hi!

    My girlfriend and I are both working through your tutorial, and we've hit a bit of a disagreement. We've both gotten the code to work but with different methods. She created the code via a GameObject, and I used a prefab. I chose a prefab because I wanted to make it spawn on a button press, (Q in this instance.) and my girlfriend just wanted it to go. I'm not sure which one will be better for continuing with your tutorial. Does it matter? (We both have it looping after the object hits the bottom.)

    Thanks man! Love the tutorials.
     
  48. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008

    Hi there,

    There are multiple ways to solve a problem. I'm not quite sure what specifically you're referring to, but for spawning, it's best to use a prefab from the project view for best practices.
    Thanks for watching!!

    Best,

    Jon
     
  49. Ch0nG

    Ch0nG

    Joined:
    Aug 4, 2014
    Posts:
    9
    I just wanted to tell you how much I'm enjoying your videos. I love how you encourage experimentation while helping guide, but not hand-hold, us though how to program with Unity. :) While I'm only on video three, I feel like I've learned a lot and it encourages me to keep going.
     
  50. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    Hi Ch0nG,

    I'm glad you're enjoying the videos and they're encouraging you to continue developing your skills!

    Thanks for watching!

    Best,

    Jon