Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by pretender · Oct 12, 2010 at 05:55 PM · pointentry

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!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

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

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image pretender · Oct 14, 2010 at 07:55 AM 1
Share

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..

avatar image chief1234 · Oct 14, 2010 at 03:31 PM 0
Share

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.

avatar image altafnazir · Apr 19, 2013 at 07:09 AM 0
Share

but in Start/Awake event, how to retrieve the parameters ?

avatar image Loius · Apr 19, 2013 at 07:33 AM 0
Share

lmgtfy.com/?q=unity+command+line+arguments

next time don't resurrect a two-year-old question with an unrelated question please

avatar image altafnazir · Apr 19, 2013 at 09:56 AM 0
Share

Better such post be restricted, by the site itself, from posting comments.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Score not adding? 3 Answers

Can someone help me fix my Javascript for Flickering Light? 6 Answers

Setting Scroll View Width GUILayout 1 Answer

Material doesn't have a color property '_Color' 4 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges