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
2
Question by Martin 11 · Mar 10, 2011 at 06:34 PM · optimizationassetbundlestreaming

Streaming Tutorial anywhere?

Ok, struggling a bit here. Currently evaluating the Pro version and when it comes to streaming the information is somewhat scatter-shot. Is there a tutorial anywhere?

When I say 'streaming', I'm referring to the loading and unloading of assets within the same game level. For example: in a U shaped level, where items at one end of the U (area A) and items at the other end of the U (area B) are loaded in and out depending on the players proximity to area A and B.

  1. In area A the items of area B aren't visible or loaded
  2. At the mid point of the U, where although neither area is visible, both areas are loaded
  3. as the player goes around the last bit of corner, area B is now visible and area A is unloaded.

This is for a stand alone 3D PC game. Is this possible? I'm guessing it is.

The example project on the unity site has no documentation and Errors when it's loaded. Examples are good, but they explain nothing at all.

I'm still in the dark on Asset Bundles. Help!

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 Martin 11 · Mar 10, 2011 at 06:50 PM 0
Share

Thanks for the link, but whilst working (yay), I'm still left completely in the dark as to the whole strea$$anonymous$$g/asset bundle aspect of Unity - CharacterCustomization contains no documentation.

I need salient info on how it works.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by AliAzin · Mar 10, 2011 at 06:40 PM

Take a look at Character Customization example.

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 Martin 11 · Mar 10, 2011 at 06:51 PM 0
Share

Thanks for the link, but whilst working (yay), I'm still left completely in the dark as to the whole strea$$anonymous$$g/asset bundle aspect of Unity - CharacterCustomization contains no documentation. I need salient info on how it works. $$anonymous$$artin 0 secs ago

avatar image Martin 11 · Mar 10, 2011 at 06:52 PM 0
Share

note I've been digging around the web for a few hours now, I'm not doing the noob thing of just asking because I can't be bothered to hunt the info out. :)

avatar image
0

Answer by Jaap Kreijkamp · Mar 10, 2011 at 10:34 PM

Wouldn't it in your case be much simpler to use Application.LoadLevelAdditiveAsync? Basically give every level segment it's own root gameobject and put it in its own scene, have a simple area manager that manages which segments needs to be loaded or unloaded, load with the LoadLevelAdditiveAsync and destroy gameobject root with all children when a segment has to be unloaded.

EDIT:

As apparently it isn't clear what I meant, I now linked back to the script reference so you can look it up. When playing with Unity, you must have walked into the concept of scenes. Basically it's all the game objects that are in Hierarchy viewer together and saved into a scene file.

With Application.LoadLevel you can load different scenes, where every scene could for example represent a level in the game. When using Application.LoadLevel you replace the scene, so all gameobjects that where in the scene before calling LoadLevel are deleted (except when marked as dontdestroybetweenscenes) and the new scene is loaded in. In your case you want to add things to your scene, not replace the scene.

Luckily there's an Application.LoadLevelAdditive as well, that does load a new scene in, but leaves all game objects (the old scene) there. So, now you could put different segments of your level in different scene files and have these load in when getting close to them.

First, when going this route you'll notice some annoying game freeze when using Application.LoadLevelAdditive, as the game is paused until the scene is loaded. That's why there's an LoadLevelAdditiveAsync as well, this does the same, but in the background, so the scene won't be completely loaded directly after calling, but it will be loaded. The example in the script reference shows how you could use a Coroutine to be able to track when the loading is done, but you could go the simple way and just make sure the loading is triggered early enough so it's surely loaded before player is close enough to see it.

Now, how do you make the sections (scenes) load in on the fly? There you have to do some intelligent coding. The easiest way is put a block somewhere in the path the player can't get around with a trigger, and the trigger code calls the Application.LoadLevelAdditive.

How to unload? The easiest way is by having a trigger object again that just calls Destroy on the objects that need to be removed. To make it easier it's smart to put everything of a sector under one root gameobject.

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 Martin 11 · Mar 10, 2011 at 11:02 PM 0
Share

Just to be clear - assume I know nothing. mentioning 'application.LoadLevelAddiveAysnc' may as well read 'aerkabjlregiyuqbp5rigq'.

Now I understand that loading/unloading and visibility control is certainly not beginner stuff, but trying to find basic instructions on how Unity does this is like pulling teeth.

Thanks for the reply, and I'll add it to the quiver of knowledge that this topic is beco$$anonymous$$g in my head. Still seeking the ABC's of strea$$anonymous$$g though.

(Am I even using the term 'Strea$$anonymous$$g' right?)

avatar image Jaap Kreijkamp · Mar 12, 2011 at 07:41 AM 0
Share

If Application.LoadLevelAdditiveAsync is aerkabj.... to you, I'd say first get the hang of this kind of stuff before diving in something very advanced like level strea$$anonymous$$g, as strea$$anonymous$$g is quite advanced stuff and not that useful if you're playing directly from computer ins$$anonymous$$d of from a net player. I'll add some short explanation, but LoadLevelAdditiveAsync is really not that complicated and well explained in the scripting reference.

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

No one has followed this question yet.

Related Questions

Scene bundles loadable in Standalone? 2 Answers

How to import the object from server to unity 2 Answers

Releasing assets loaded from asset bundle 1 Answer

Can the web player access asset bundles on Amazon S3? 2 Answers

AssetBundle.LoadAsync() and Code Stripping 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