Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question How can i write my own code????

Discussion in 'Getting Started' started by Maldron, May 19, 2024.

  1. Maldron

    Maldron

    Joined:
    Apr 28, 2024
    Posts:
    1
    I'm having a hard time learning Unity.
    I've watched a lot of tutorial example videos and created projects, but for my personal projects, I don't feel like I can code on my own.
    For example, I need to create a feature that patrols for enemies.
    I can't code by myself, so I'm watching ChatGPT or tutorial videos and copying and pasting code from the internet. I think I'm relying too much on ChatGPT and tutorial videos.
    How should I solve this problem, any advice would be appreciated.
    (I apologize for my poor English).
     
  2. WhiteCreation

    WhiteCreation

    Joined:
    Dec 31, 2023
    Posts:
    34
    Take some basic C# courses! Try Unity Learn. Use Junior Programmer pathway. Don't be afraid of your English. Many of us (me) don't know English properly.
     
  3. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,210
    start small

    realllly small

    if you follow tutorials dont just type what they tell you, or you dont learn.
    Look up all the things they use, look at what other choices those options lead you to, follow the trails, every class has many options and properties, unity has good documentation

    build up on things.. there are many good tutorials and some shockingly bad.. one of the biggest issues is they do a type things click that, move this, and at the speed of light theyve gone from here to there, where as you need to wait 2 mins while unity loads the code and you find the menu... I recommend actually if you can watch on an ipad. so you can slap the screen to stop and start it and double smack left to go back :p

    but make sure you read up on all the things they do, once you start following, start trying to challenge yourself to do it before they show you - I like Penny de Byl's courses who gives you a bunch of ground work, then sets you a challenge, then shows you how she would do it.. rather than just tells you do this
     
  4. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    8,417
    Coding is problem solving. And most problems are made up of smaller problems. Part of learning to program is learning how to problem solve. How to break problems down into smaller ones. And particularly, how to research these individual problems and learn how to solve them. Each little problem you solve is another little bit of knowledge that makes future problems easier and easier to solve.

    It's tough at the beginning as you have none of this supporting knowledge. But it eventually snowballs and the rate in which you solve problems gets faster and faster.

    Worth noting programming is also a creative endeavour. Solving certain problems does require a degree of creativity and out-of-the-box thinking,.

    So like above, start small. Make little Warioware style micro games to get a handle on things. But do push yourself to learn more and more and try bigger things. If you do watch tutorials, watch them to learn how to solve a problem but don't just parrot what they do.

    Learning C# on it's own is also worthwhile as nearly all of it will be of use in the context of Unity.
     
    Spy-Master likes this.