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
1
Question by firestorm713 · Apr 29, 2012 at 09:26 AM · scene-loadingloadlevelasyncloadleveladditive

Scene Streaming(Bethesda Style, not an internet question)

In the Unreal Engine, there is a concept known as level streaming, where you enter a volume, and the scene behind you is unloaded, and the scene in front of you loads, creating a seamless transition from one level to the next. Examples of this on a small scale would be like Bioshock or Mass Effect, where the former used an underwater walkway that went between massive structures, and the latter used elevators, much to the players' chagrin. Bethesda uses a similar method, but not as obvious, using tons of LoDs, and each chunk streams(essentially) the 8 chunks around it, having Radiant run in the background for NPC logic.

I'm looking to do something similar, and while I have the concept figured out in UDK, I much prefer Unity for scripting, and I was wondering where I should look in the documentation for a similar concept. Every time I search for Level Streaming, I get results for the web player, and talking about internet streaming, but I can't think of better words for it. Perhaps dynamic scene loading? Has anyone tried and/or implemented such a system? Or can anyone think of a good way to fake it?

Not looking for code or for someone to do it for me, more just a hint at where to look or the right questions to ask. Thanks!

Comment
Add comment · Show 3
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 syclamoth · Apr 29, 2012 at 09:27 AM 0
Share

Have you read the script reference? LoadLevelAdditivelyAsync is specifically made for doing exactly this. I recommend that you familiarise yourself with the capabilities of all the classes in the UnityEngine namespace- even if all you know are the names and paramaters of all the functions, that's still enough to work out how to do all but the most complex of scripting tasks (which this is not, really).

avatar image firestorm713 · Apr 29, 2012 at 09:35 AM 0
Share

Thank you very much. As stated, I was stuck in ue3, and couldn't figure out the word I was looking for. Also good advice generally. I'll take that to heart.

avatar image firestorm713 · Apr 29, 2012 at 09:43 AM 0
Share

Ah. This is a pro only feature. Should have guessed. I'm going to go out on a limb and assume there's no similar functionality in the indie version?

1 Reply

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

Answer by Bunny83 · Apr 29, 2012 at 11:13 AM

Like @syclamoth said Application.LoadLevelAdditiveAsync is exactly what you want but like you already figured out it's a pro-only feature. In the free version you can use Application.LoadLevelAdditive, but it's not that "seemless" since it will block until it's loaded.

I wouldn't say that it isn't possible in the free version. You might want to use you own scene format (some kind of xml scene). You have to find your own way to load (stream) all kind of assets (mesh, texture, material, gameobjects). It's still probably not as seemless as with LoadLevelAdditiveAsync but it should work. Note that some things can't be created / accessed from scripting but just a few (for example only ParticleEmitter is exposed to scripting but not the EllipsoidParticleEmitter so it can't be created via code). A workaround is to create some simple prefabs which can be instantiated.

I haven't done this before, but you should do some testing before you decide to go along with a specific method.

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 firestorm713 · Apr 29, 2012 at 07:36 PM 0
Share

Thanks. So what's the primary difference between doing it asynchronously and not? Or in other words, how is it less seamless?

avatar image Bunny83 · Apr 29, 2012 at 10:04 PM 0
Share

The asynchronous functions do the actual loading in the background in a seperate thread. This allows you to continue playing while the scene is loading. There is no interruption in the gameplay.

The simple LoadLevelAdditive function will interrupt the gameplay since it loads the scene in the current thread. It will block until the loading is finished.

If you have a strong pc and your "scene parts" are small you might not even notice the hiccup, but on iOS you will notice it since loading and destroying are quite heavy on mobile devices.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

LoadLevelAsync hiccups on scene switch 0 Answers

Load and run scene in background 1 Answer

Resources.load vs LoadLevelAdditive which is faster 1 Answer

LoadSceneAsync breaks lighting with Assertion failed (Update: Light probes are to blame!) 0 Answers

RenderSettings not overwritten when using LoadLevelAdditive 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