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 kk93 · Feb 08, 2014 at 06:19 PM · androidiosmobileoptimization

Having just one scene in the game: is it inefficient?

Hello,

I am currently making a simple mobile game. I think I can make the GUI interesting if I do it all on one scene (i.e. Main Menu, Options Menu, and the actual game will all be on one scene). The biggest issue I have with this strategy is that, by the time I am done doing this, there will be tons of objects just lying around outside of the view of the camera.

Is this going to affect performance?

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

2 Replies

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

Answer by tanoshimi · Feb 08, 2014 at 08:38 PM

I'm aware of several commercial Unity game releases that have made use of only a single scene. For example, Xiotex's Blast 'Em and Mike Bithell's upcoming Volume.

Rather than just being placing menu options etc. outside the camera viewport when playing the game, you should call SetActive(false) on them - that way they'll be disabled and won't eat up any CPU cycles until you enable them when needed.

Comment
Add comment · Show 1 · 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 kk93 · Feb 08, 2014 at 09:45 PM 0
Share

Thank you for the info!

avatar image
1

Answer by gamenovice · Feb 08, 2014 at 07:01 PM

if you do not have occlusion, and probably even with that, yea it would affect performance. you could be right in having what is known as a 'MASTER' scene and then using the Application class, you can do things like 'LoadLevelAdditive' where it adds scene data from other scenes to your current scene. Basically to better answer your question, I recommend you take a comprehensive look at the Application class in the unity docs.

Comment
Add comment · Show 4 · 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 gamenovice · Feb 08, 2014 at 07:02 PM 1
Share

however, the question arises 'how do i delete this scene and load in a new scene' honestly I wouldn't know too much about that part...

avatar image kk93 · Feb 08, 2014 at 07:05 PM 0
Share

I will look into that. Thanks!

avatar image AlkisFortuneFish · Feb 08, 2014 at 07:28 PM 1
Share

One way to approach that problem, although by no means the only way, is have all the game logic that must always stay marked with DontDestroyOnLoad and then just load the new level scene in. Your logic will stay and any other level stuff will be destroyed.

avatar image kk93 · Feb 08, 2014 at 07:35 PM 0
Share

Thank you, I will look into that as well!

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

21 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to Smooth X Axis Movement on Mobile Devices? 2 Answers

Can a iOS game camera have the Bloom optimized effect with clear flags = depth only? 0 Answers

Is it okay to store many player preferences for mobile? 1 Answer

Is Gyroscope supported on all mobile Android iOS devices with a gyroscope? 3 Answers

Receiving UI/touch events while mobile soft keyboard is open 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