Can someone point me to a good guide that covers how to approach programming the over all game? I can make a scene and add objects and cameras and different kinds of nifty behaviors, but I still have no idea how to program a game in it. Isn’t there some kind of main file that controls the over all game logic, loads new scenes, etc. I assume it’s a script… but beyond that I’m a bit confused. I’ve spent hours going through the documentation but haven’t found anything that covers this.
Any help would be great, thanks! 
What do you mean by “over all game”? I think you’re looking for something that doesn’t exist. Be more specific. Check out the GOOD ADVICE from Higgy B
Ok, I’ll try to be more specific. When I’ve written games in other engines I’ve always had a main file, usually called something like main.cpp or whatever, and I would reference other external files. That main file would have a bunch of setup at the beginning to get things running and loaded and what not. That mail file would also contain the main game loop, this loop would act as an over structure for the game. If the player was in the start menu, that would be a state within my game loop, if a level needed to be loaded that would be function that would be called from my main game loop. I don’t see anything like that here.
I guess I’m struggling with a bit of a paradigm shift…
In Unity do you have a script that controls these things? I can’t find anything that explains this.
I did see in one of the example games there was a script called game_manager that seemed to be handling these things. But there was no explanation on how it integrated with the project.
So, basically I guess my question boils down to this: If I want to tell my game to load a new level, how would I do that and what file would that command sit in?
Unity doesn’t have any main.cpp files or main loops; it’s all component-based. You should go through some of the tutorials, such as the 3D platform tutorial, which is a complete game.
–Eric
You’d do that by calling Application.LoadLevel(), from any script in your game that makes sense. You don’t implement a ‘main’ method with a master game loop in Unity, because Unity supplies that for you. If you need game logic that doesn’t naturally belong to any single entity, you can create an empty game object, attach a script to it, and put that logic there. That’s the ‘game_manager’ object you’ve seen elsewhere.
Unity’s design encourages you to think in terms of small, encapsulated ‘units’ of behaviour or functionality, implemented as scripts that attach to the game object they manipulate. For scripts that don’t naturally map to an entity in your game, like GUI scripts for example, you either attach those behaviours to something convenient or you create a dedicated ‘empty’ to attach them to. It may be different than you’re used to, but it works well once you get used to it.
Ah, I see. Thanks! That clears things up a bunch.
I will go through the 3d platform game as well, since I’ve read in other posts that it’s a good starting point.
I generally make a main script for each type of scene, it sits in an empty object called “main” and has the main game loop in it’s update().