- Home /
entry point of the application
i started using unity 6 months ago, and all i can say it is a great tool for making interactive and realtime applications. i now have some experience and i dont ask too much any more in the forums, i just need a little more to understand the big picture as far as programming is concerned.
so far i programed many tools, scripts and components and i am wondering how you organized all of the stuff you make. what is the entry point of the application?
i dont think that i have entry point specifically in my project, i have update loop in the script that is attached to the camera where rendering begins but i would like to know how others do it.
do you have a GO where you instantiate everything else or some other method. i would like to keep things organized and tidy and i am looking for somebody more experienced to explain what are the most efficient methods...
thanks!
Answer by chief1234 · Oct 12, 2010 at 06:06 PM
The Awake() and Start() functions are called when a project loads and are usually used for all setup jobs.
Awake() is usually used to set up any dependancies / connections between scripts and objects. It is called on each script before any other code is run. http://unity3d.com/support/documentation/ScriptReference/MonoBehaviour.Awake.html
Start() is called after Awake() is finished, and that's where you would usually call things like intro screens or any other setup tasks. http://unity3d.com/support/documentation/ScriptReference/MonoBehaviour.Start.html
i know all of those things, i was just wondering how you guys organize your code so that you have only one awake and start in your code. i currently have many scripts and all of them have awake and start and it's hard to see where it all begins..
Ah, well in that case I usually create a "Util" or "$$anonymous$$anager" script that links to all the other important scripts in the scene. Simply having "Setup" functions in each script, and calling them all from the Util script works well. You may get a better answer on the forums, since I'm sure there are a number of ways to go about it.
but in Start/Awake event, how to retrieve the parameters ?
lmgtfy.com/?q=unity+command+line+arguments
next time don't resurrect a two-year-old question with an unrelated question please
Better such post be restricted, by the site itself, from posting comments.
Your answer
![](https://koobas.hobune.stream/wayback/20220613075439im_/https://answers.unity.com/themes/thub/images/avi.jpg)