[Question] complete scripts for different needs?

Hello everyone, so this may be a request/question that gets shot down quickly but here we go.

I was wondering, is there somewhere I can find pre-made scripts for the very basics? I’ve watched tutorials and such for the scripts I need to get started on my game but some of them are either way too fast or don’t show the whole script and assume we know what they’re typing

I’m currently learning C# and know I need to know it to create more advanced scripts and create the scripts I have ideas for, but I was wondering if I could find some premade scripts for stuff like character controllers, AI controllers, base building systems, grid building, RTS, or hack n slash stuff, etc.

very basic scripts that I’ll need for my games but I don’t want to develop or write myself, just takes a lot of time and I want to get to the bulk of the development and such quickly, again I just want to get the very basic scripts needed so I can start on my more advanced scripts because those scripts need the base scripts to even be able to start writing them…

like a data base or even a asset package on the store I could buy. OR if anyone has any scripts they’re willing to send me or post for me haha.

The internet is covered in millions of Unity script examples.

As you have found, on their own they offer very little value to a beginner.

Even if you found some golden magical mystery compendium of every script written ever for Unity, it too would have literally zero value.

Why?

The script is the teeny tiny part.

The actual meat and potatoes is in the “what problem are you solving?” and “how are you going to solve it?”

Not only that but script in Unity is EXTRA-worthless because unless you connect 100% of the script parts into where it needs, including prefabs, scenes, other scripts, scriptable objects, assets, etc., the script alone is useless.

This is because this is actually engineering, not art. There’s art too it, but the art becomes irrelevant without the engineering, because even one wrong bit and everything does not work. Software is like that.

This proves that you’re doing it wrong. You don’t “watch tutorials.” That’s not a thing in exactly the same way you don’t “watch brain surgery” to learn how to operate on people’s brains. Instead, this is how learning works:

Tutorials and example code are great, but keep this in mind to maximize your success and minimize your frustration:

How to do tutorials properly:

Tutorials are a GREAT idea. Tutorials should be used this way:

Step 1. Follow the tutorial and do every single step of the tutorial 100% precisely the way it is shown. Even the slightest deviation (even a single character!) generally ends in disaster. That’s how software engineering works. Every single letter must be spelled, capitalized, punctuated and spaced (or not spaced) properly. Fortunately this is the easiest part to get right. Be a robot. Don’t make any mistakes. BE PERFECT IN EVERYTHING YOU DO HERE.

If you get any errors, learn how to read the error code and fix it. Google is your friend here. Do NOT continue until you fix the error. The error will probably be somewhere near the parenthesis numbers (line and character position) in the file. It is almost CERTAINLY your typo causing the error, so look again and fix it.

Step 2. Go back and work through every part of the tutorial again, and this time explain it to your doggie. See how I am doing that in my avatar picture? If you have no dog, explain it to your house plant. If you are unable to explain any part of it, STOP. DO NOT PROCEED. Now go learn how that part works. Read the documentation on the functions involved. Go back to the tutorial and try to figure out WHY they did that. This is the part that takes a LOT of time when you are new. It might take days or weeks to work through a single 5-minute tutorial. Stick with it. You will learn.
Step 2 is the part everybody seems to miss. Without Step 2 you are simply a code-typing monkey and outside of the specific tutorial you did, you will be completely lost. If you want to learn, you MUST do Step 2.

Of course, all this presupposes no errors in the tutorial. For certain tutorial makers (like Unity, Brackeys, Imphenzia, Sebastian Lague) this is usually the case. For some other less-well-known content creators, this is less true. Read the comments on the video: did anyone have issues like you did? If there’s an error, you will NEVER be the first guy to find it.

Beyond that, Step 3, 4, 5 and 6 become easy because you already understand!

3 Likes

Scripts are extreeeeeeemly reliant on context, so it’s pretty-much impossible to just find all of the scripts that you need and expect them to work together without understanding how to modify them to suit your specific project.

Edit: also, so you’re not really asking for anything more specific than “basic scripts” then any of the thousands of templates on the asset store do include “basic scripts” of some form or another. Maybe that’s what you’re looking for?

3 Likes

Thank you so much! this is pretty much what i was asking for, i can modify the code and adjust them to work together, I just don’t want to have to write all the code i need, just want to be able to look through scripts for specific needs to get started so i can concentrate on developing my more difficult code. just wasn’t sure how to find such “templates” on the asset store, just searched mostly for anything script related, didn’t think of templates haha

Thank you!

Hey come on dude. Scripting is 90% the fun! You will see once you get into it. I’m a novice but that doesnt matter, i love how fun it is to wrestle with something and then enjoy the rewards of getting it right. This community is absolutely fantastic. Start small, you cant fly before you can crawl. It takes a long time…

1 Like
  • If you fail to understand or quickly develop the very basic things, why do you expect it to be any different after you miraculously found just what you were looking for and then start with the “more difficult” scripts? It’s not like those will be easier to write, or less effort. Quite the opposite, since now you lack the understanding for even the basics of what’s happening, and skipped right ahead to advanced stuff.
  • If tutorials are too fast, you dont watch good ones. Brackeys, Sebastian Lague and some others all have good beginner stuff on their channels. However, as @Kurt-Dekker already stated: you must go along with the tutorial. Just watching it is useless. Type every line of code yourself. Understand what it does. Try around and see what happens when you change things.
  • There are several basic setups to look into. Unity itself provides quite a few example scene setups. Most youtubers worth their code also publically host it on github for you to download and play around with.

The thing with “skipping ahead” is that you will work with a lot of foreign code. Let’s say you didnt want to implement a character controller, so you simply download one. Now you want to adjust it for your “more difficult” setup. Where to start? There is somewhere between a bit and quite a bit of code you never even saw. So where to start? What’s the right place to put your code? Do you need to rewrite existing parts? Which ones? Where to find them? What is causing some behaviour X you want to get rid of or change? Where is the code for that? And so on.
I’d argue that implementing it from scratch yourself is usually the faster way. Unless of course we are talking about some libary or asset you want to use as-is. I dont want to sound rude, but you already mentioned that you did not make it through the tutorials for “the basics”. So i absolutely do not recommend you to skip the easy parts just so you can work on something harder.
Those “basics” are also the foundation of whatever you are designing. Just like with real architecture, in software architecture it’s usually best to implement things with a goal in mind. The longer you work on something, the more decisions you make. The more decisions you make, the harder it gets to change things down the line. So starting with something that might have had a different goal in mind (even if kept mostly generic), is not exactly good if the project is supposed to be anything more than a learning experience. Needless to say, skipping the learning part in a learning project wouldnt exactly be right either.

2 Likes