Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
2
Question by medelba · Jan 31, 2020 at 10:22 PM · unity 4.6

Additive scene loading or dont destroy on load?

Hello, I don't know what is the best and more efficient way to organize my scene manager. I'm developing an AR game (with DreamWorld glasses) that has 3 scenes to appear (language and avatar selection) before the main game scene. The architecture now is like this: 1) Main basic scene that contains the camera, a cannon gameobject and other environment stuff that I will need in all scenes 2) Language Selection Scene that contains the game objects for language selection (flags, etc..) 3) Avatar Selection Scene that contains all avatars and their description and other objects 4) Main Game Scene containing all the effective game.

For know I'm loading first the Main basic scene and in additive mode the language scene. When I'm done with language selection I unload the Language selection scene and again load in additive mode the avatar mode, and again till the main game scene.

Is this the right way to do that? In the end I will have unloaded Language and Avatar scene, and loaded for the rest of the game the main basic scene and the main game scene.

Is it better like this or it's better to put all the stuff that is in main basic scene in a DontDestroyOnLoad mode? Is additive mode handled like this a bad practice?

Thank you very much!!

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
0
Best Answer

Answer by kromenak · Jan 31, 2020 at 11:01 PM

What you describe sounds like a fine solution. I'd argue that there are a lot of different ways to implement the desired behavior. At a high level, you've got two tools: scenes and prefabs.

A very simple game might have all objects for menus and gameplay in a single scene, and you simply activate/deactivate game objects when they're needed. But as games get larger, you may have a need to split things up into multiple prefabs or scenes.

One reason to split stuff up would be that it makes the content easier for multiple people to edit. If everything is in one scene, you might get a lot of merge conflicts from version control. Creating separate prefabs or separate scenes (or both) makes it less likely you'll make a conflicting change to a file.

Another reason to split stuff up is to organize what needs to be in memory at the same time as other things. On a project of mine, we used two scenes (Frontend and Gameplay). All the menus were not needed during gameplay and the gameplay was not needed during menus. So, we just load between the two as needed. Anything that needed to persist for the entire duration of the game was marked "don't destroy on load."

Anecdotally, I have had concerns that loading new scenes (additive or not) may incur some loading time or at least a small performance hitch. However, this might be fine with newer Unity versions, or maybe I was doing something wrong at the time. But do consider that loading a scene is probably more work for the system than simply toggling a GameObject on/off. Especially if you want seamless transitions between menus or something like that, it might be better to put multiple menus in a single scene.

So, I think organizing in different scenes and additively loading as needed is fine. Your alternatives might be to put the stuff in the scenes into prefabs and then Activate/Deactivate instantiated prefabs as needed, or maybe put all non-gameplay stuff into one scene and gameplay stuff in a different scene. Using "don't destroy on load" is mostly great if you need something to persist between scene loads - most commonly a manager class or something like that.

Comment
Add comment · 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
1

Answer by austephner · Jan 31, 2020 at 10:52 PM

For me personally, I start the game with a scene that loads all my singletons (like translation management, input management, etc.) then sends the users to a new main menu scene where they can do stuff before playing the game (loaded in separate game scenes). But really it depends on the nature of your project and what suits you the best. I've seen single-scene projects and they tend to be very messy when not handled correctly. Having multiple scenes comes in handy for sure.

Comment
Add comment · 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

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

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

Unity 4.6 UI Touch Detection 1 Answer

[Unity 4.6]Anchor element top side to the bottom side of another element. 0 Answers

U4.6 - Equivalent command to NGUI's UIButton.current to detect which button was clicked 1 Answer

DX11 shader model 5 unavailable 0 Answers

Mesh Collider is Hiding Capsule Collider 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