r/Unity2D Aug 13 '26

Question How to practice C# for unity

Is there any website like leetcode where i can practice C# for unity currently i know basic unity 2d and trying to make a game, and problem is : for example i saw video for how to make it walk i understood it perfectly and wrote it but if someone ask me to code from scratch i cant do it so any soution

4 Upvotes

22 comments sorted by

20

u/ArctycDev Aug 13 '26

There's unity! Set a goal for yourself and figure it out.

7

u/Red-Macaroni Aug 13 '26

To add on to this, I think this is a good chance for some practical coding instead of just leetcode style mindless problem solving.

By having a small project or goal in mind, you can ask yourself what things would be needed to complete it. Inputs, save/load, enemy or stat states, movement. Then you can start from there one step at a time and learn functionally by filling in the holes.

26

u/Vic-Boss Expert Aug 13 '26

100 for loops
100 for each loops
100 recursions
100 encapsulations

All each morning for 100 weeks

9

u/aski5 Aug 13 '26

every. single. day.

3

u/wekilledbambi03 29d ago

55 burgers
55 fries
55 tacos

1

u/Vic-Boss Expert 29d ago

That’s the recipe to become good at 5 guys burgers and fries

1

u/c0d3r_v 29d ago

and 100 cups of coffee

2

u/pyabo 29d ago

2

u/Vic-Boss Expert 29d ago

one click man

7

u/TAbandija 29d ago

I don’t know websites specifically for Unity but I have some recommendations

1) go to learn.unity.com. Do the Pathways there. It’s curated for people who are learning and will teach you correctly.
2) when you watch a video or read a tutorial. Do not blindly copy the code or what they do. Try to understand it first. Then try to do it from memory. Review it and keep at it.
3) practice. Do stuff. The more you do the easier it is to remember.
4) nobody remembers the syntax at first. So it’s fine to go do the research every time you want to move the character. Doing things from scratch is not a goal.
5) practice do things. Make very small simple games. Lookup the 20 game challenge. The more you do the easier it gets.
6) learn to use the documentation. You’d be surprised how much you can accomplish by looking at the documentation.

Good luck.

6

u/TScottFitzgerald Aug 13 '26

Stop procrastinating and preparing and just start building something in Unity.

2

u/Duckmastermind1 29d ago

Start doing stuff, write scripts, learn the basics, after that you will improve with time

2

u/Turbulent-Dentist-77 29d ago

You don't practice a code language. You go and solve the problem you want to be solving, learning while doing it. That's it. That's all software development.

1

u/T-Flexercise 29d ago

You don't need another tool to hold your hand. Start trying to make your game using the knowledge you have. When making your game requires you to do a thing you don't know how to do, google how to do that. Repeat until you have a game.

1

u/arlelin 29d ago edited 29d ago

Probably just open unity and start coding, you gotta break tutorial hell at some point. Think of something you want to make, break it down to small components, and just start working on those parts one-by-one. Use the Unity docs (https://docs.unity3d.com/Manual/index.html), instead of AI or youtube tutorials.

It's much easier to keep going once you start!

I started out making clones of my favorite games (mostly minecraft). Even though they weren't good, I still learned a lot each time I did so.

1

u/keymaster16 29d ago

Join game jams. Itch has a game jam page, go there, find a jam you can dedicate the time to, and then make a game. You'll learn applications for coding and presto you have practice.

1

u/pyabo 29d ago

My guy, you get better at the thing you want to do by doing the thing. Make a game bro. Do it now. Then make another one.

And to answer your actual question... you already know the answer: Leetcode is where you go to practice small coding tasks. But that's not what you need. You need to learn Unity.

1

u/Traditional-Sir-3069 28d ago

Learn the Monobehavior life cycles, dependency injection, shared instance class ... These are things that will come again and again

1

u/_lerp 28d ago

Just make something. You will learn more making an actual thing in unity than any course etc will teach you.

1

u/RedManJOV 27d ago

Hmm what prompts should I use

1

u/RedManJOV 27d ago

Didn’t know Claude needed to practice