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 ravsters · Dec 20, 2012 at 04:25 AM · gameloadspaceroomidea

How do I load in different rooms (Metroid Prime style)

Hey everyone. I have been thinking of different ideas and techniques to streamline a level/room loading system.

I have been looking at the way the Metroid Prime series loads it's worlds. The rooms, surrounding the room you are in, are being loaded as you do stuff in the room you are already in. When a player opens a door to exit the room, the door doesn't open until the room on the other side of the door is fully loaded.

What would be the best way to replicate this level/room loading system in Unity? I just need a push in the right direction. Any ideas will greatly help!

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

3 Replies

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

Answer by CodeMasterMike · Dec 20, 2012 at 06:45 AM

If I really needed to have this kind of system, I would use the LoadLevelAdditiveAsync/LoadLevelAdditive function to load the new room or scene. So, I would do something like this:

Option 1 (requires Unity Pro):

  • Player comes to a door and tries to open it. But the room (or scene) behind the door needs to be loaded before the player can enter.

  • I load the new scene with the Application.LoadLevelAdditiveAsync function.

  • When the above function is done and the scene is added to the game.

  • The scene is loaded and ready, so I open the door and the player can enter.

Link to LoadLevelAdditiveAsync documentation

Option 2 (doesn't require Unity Pro):

  • Player comes to a door and tries to open it. But the room (or scene) behind the door needs to be loaded before the player can enter.

  • I load the new scene with the Application.LoadLevelAdditive function.

  • Now I have to have some kind of check from the new scene, that lets me know its done loading and is running as normal. So I wait until this check lets me know its done.

  • The new scene check lets me know its ready, so I open the door and the player can enter.

Link to LoadLevelAdditive documentation.

I hope this gives you an idea how you can do it.

To add to the little discussion why you would need a system like this:

I see there is a use for it, if you want to re-use a room, or if you want to split up the world into smaller pieces which may be easier to handle. Just my two euros.

Good luck!

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 ravsters · Dec 20, 2012 at 07:00 AM 0
Share

Thanks for the information! I know where to look now! Thanks so much! I'm going to continue doing research about this method. I have a feeling I'm going to be asking more questions about "LoadLevelAdditiveAsync" Lol. You did give a very detailed explanation. Thanks a bunch! If I have anymore questions, I'm sure you will see it! :)

avatar image
0

Answer by Alec Thilenius · Dec 20, 2012 at 05:10 AM

If you explain a little more why you want this, I may be able to help more. For rendering, Unity Pro supports Occlusion Areas: http://docs.unity3d.com/Documentation/Components/class-OcclusionArea.html

If you want to implement such a system to save memory, then unless you have a world that is HUGE (I'm talking World Of Warcraft huge) it is not worth loading and unload assets into memory at run time.

Let me know what your end goal is and i'll update my answer.

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 ravsters · Dec 20, 2012 at 05:35 AM 0
Share

Thanks for the response. Our end goal is to make a massive space station that players can explore to their hearts content. Also, yep I was thinking of implementing a system similar to this to save memory. I'm ALLL ears!

avatar image Alec Thilenius · Dec 20, 2012 at 05:48 AM 0
Share

I would recommend not implementing the system unless it is actually needed. Do you actually have more than a gigabyte of assets? (Compiled assets, not what is in the "Assets" folder). Remember that the actual level itself takes up almost no space. It is only the assets that the level uses that take up memory space (Textures, meshes, sounds...)

This can be done with Unity Pro, using Asset Bundles: http://docs.unity3d.com/Documentation/ScriptReference/AssetBundle.html

avatar image
0

Answer by tw1st3d · Dec 20, 2012 at 06:32 AM

You could just have a camera at specific spots, and when you go through a door, the camera jolts to the left/right.

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

12 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

Related Questions

saving the game in position 1 Answer

Creating endless room for endless falling game 0 Answers

Render Extremely Far off Objects 1 Answer

Problem Saving game progress 1 Answer

Save game and load 2 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