Good Example of Game Structure/Organization in Unity?

I am new to Unity, but I have been making games for a bit… in Flash. I am used to the Flash Builder/document class/ OOP style of actionscript coding, and I am having a bit of trouble getting used to the scripting style of Unity. Specifically, I am trying to port a fairly large game I made in Flash to Unity (Big Time Racing). It has multiplayer, lots of player data stored in databases on my server, chat, and lots of non-3D GUI stuff.

I understand the details of C# and JavaScript scripting, but when I step back to get a big picture of how best to organize my game in Unity… my head spins. I have ideas on ways to do this myself, and I can defitinitely figure something out. But I am pretty sure if I do it this way I will run into some “gotchas” down the line.

Are there any good examples of game organizational structure that I should be looking at? The tutorials on the website are great, but not really big picture enough for my problem. Also, I want to stick with Unity’s scripting style… I don’t want to work against the grain and try to do it all in code as I am under the impression that this will limit my ability to take advantage of a lot of Unity’s built-in functionality/community help/asset store stuff/etc.

Thanks!
Shawn

I´m Looking for same thing.

I think there is no one way to approach things… I think just go with what you think should work and you’ll learn as you go… just start working… :wink:
Can’t learn everything IMO, some things you just have to try…
But if somebody has something, im looking for the same thing :slight_smile:

I am wondering the same thing. I found this: http://www.openchord.org/blog/, but I could use a bit more direction. I started a small to midsize project using OOP style and it basically fell apart.

I am going to start the project again from scratch and try to really focus on having everything contained within the prefab, making each script really discreet and small, and avoiding trying to set up thing in script (using the inspector seems to be more with the unity flow). But I could be totally wrong.

If there are no good articles, maybe someone with some good experience can share?

I agree with okimoki. I think there are many ways to approach a project. There is certainly optimizations that can be done, but there is always the caution about over optimizing too soon. For mobile devices, there are stronger suggestions of things to do, like avoiding too many Update loops and to use Pooling over many independent objects lots of instantiation and destruction, but there are many ways to skin this cat. I’d suggest trying out some of the tutorials to see how they are done, but this can be deceptive, as some are written to get the new user up and running fast, rather than properly optimized.