- Home /
Is there a "library" of scripts?
Is there a website, a depository, or a location where people could get generic JavaScript scripts for Unity? I'm interested in using scripts and learning from them but wherever I find scripting information, there is usually broken up scripts that just cover the information that they are highlighting without showing a complete script. I'm looking for "Clip-Scripts"! (like clip-art). LOL! Thanks, Tom
There is no such website. And I have to admit, I doubt there will be one in the near future. Your closest call is to look at the ones that come with the example projects, I think. The reason is that scripts are almost always specialized in some manner, such as looking for a particular file on disk, or calling GetComponent with the name of some other custom script for an argument, or calling GameObject.Find to locate some GameObject with an explicit name that may not exist in your project. You can't just take those and slap them onto objects in your project without knowing how to modify them - they'd crash. And if you start digging in them to modify them, well... Then you're editing scripts anyway and might as well learn to write code properly. And if you're learning to write code properly... Then you might as well apply the snippets you find when you search. :)
That makes a lot of sense. Thank you very much, but I can't give you a thumbs up for your answer because it's not in the answer box. If you move it, I will be happy to post it as answered.
$$anonymous$$
Harabeck is correct. Also look in the scripting forum, there are some posts chock full of handy scripts. Complete JS and C# scripts.
Answer by Harabeck · Feb 17, 2012 at 11:06 PM
The closest thing you'll find: http://unifycommunity.com/wiki/index.php?title=Scripts
Thank you. I'm sure it will help me in the long run of learning. $$anonymous$$
If you want to learn, there is a "Really simple scripts" section in the general tab.