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 ronaldosilva · Feb 13, 2013 at 03:53 AM · logicorganizationstructure

The best way to control a game flow?

Hi Guys! I am developing a game with unity and I get around just fine. I have prior experience with programming in many langues, but more often for web applications. Migrating to game programming was easy, and I could make all the stuff on my game myself, but today near the end of the main aspects of the game I am very concerned with structure and organization. I am trying to implement the logic for Loading--> Main Menu --> GamePlay -->Pause -->Options and so on, and I need to know if there is some design pattern or any other approach to implement this logic. I know about the DontDestroyOnLoad and stuff but I am wondering if there is some well used solution to that problem. Thanks in advance!

Comment
Add comment · Show 1
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 ronaldosilva · Feb 13, 2013 at 04:03 AM 0
Share

Or if someone can point me to the right direction. I would help me a lot! ;)

1 Reply

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

Answer by iwaldrop · Feb 13, 2013 at 06:52 AM

We typically use a Bootstrap MonoBehaviour and Scene that will load/fetch data from disk/web, initialize plugins, and load the splash screen and main menu scenes. The Bootstrap GameObject is marked don't destroy on load, as you mentioned, and it follows the singleton pattern so it's available to any script when necessary (though it is almost never necessary for game scripts to need to talk to Bootstrap). In reality, once the game is to the menu there is hardly a need for it at all anymore.

Long story short, you're already on the right track here with your thinking!

Comment
Add comment · Show 2 · 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 iwaldrop · Feb 13, 2013 at 06:59 AM 0
Share

Additionally, google Unity bootstrapping to get examples of how others do it.

avatar image ronaldosilva · Feb 13, 2013 at 01:02 PM 0
Share

Interesting! Thank you very much! I will make this research! ;)

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

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Click an object to show its group / structure / tree ? 0 Answers

How do I make an Object Hirarchy - I want a performant way to check if an object is an Enemy and or a specific type of enemy 2 Answers

Scenes and objects organization in games like Stellaris or Endless Space... 0 Answers

Project Classes Organization - General Question 0 Answers

New to unity,need a help on game struture for a causal game 0 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