Smaller examples would be nice?

I like the examples but anyone else like some smalle r ones ?

For example, my goal now is to just make a project that create a bunch of phyics balls that pour into a bowl and then stops… and thats it!

Im still trying to wrap my head around the right way to go about it… like where do I attach the script? In this case does is make sense for the script to be attached to a empty gameobject… or attached to the camera?

I am rambling… But just wondering are there any other tiny examples out there ?

A lot of script-attach questions are really up to you. There’s no “wrong” way in the sense that it won’t work. Or there is but it will be self-evident when you try!

Usually I find it’s best to create an empty GameObject for your general logic scripts and then create new ones for new categories as they arise (ie, don’t pre-factor out your objects!).

I made a project showing what you want (I think). No scripting needed for something like this. :slight_smile:

Simply open the project in Unity (File>Open Project) and load the scene in the project view.

http://rapidshare.com/files/278344717/Silly_Thing.zip.html

So I am thinking if a action that occurs in the world is not directly affecting one static object then that action should go in a stand alone script yes?

I mean its obvious if I need a script to control the comara movement… attach the script to the camera…

But when you have dynamically created objects like balls being dropped on the terrain. Those balls are created at runtime… so should I make that action occur in a script alone… OR should the initial ONE ball that is in the scene… should I attach the action to that?

thanks ill look at it when I get home…

I don’t know how you can do it without scripting since you need to instantiate the objects in a loop to create them…

Oops! I thought you just wanted to have spheres drop into a bowl. My bad. Instantiation is an odd one because there are so many ways to do it. Best way is to instantiate prefabs.

For instantiated objects, best place to put a script for instantiating is on the object that TRIGGERS the instantiation. For example, if a character moves through a collider and then spawns enemies, you would put the script on the collider. And if you have a GUI control that you click on to instantiate something, you would put it on the camera.

Sorry about the confusion. :slight_smile: