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 CoixdeNono · Feb 13, 2013 at 04:00 PM · sceneassetbundle

Importing a scene from AssetBundle

Hello, i'm trying to understant the AssetBundle, by doing some exemples from the scripting references of unity. It went well for the AssetBundle that contains game objects . But when it came to import the scene in an AssetBundle that contains levels (built it using : BuildPipeline.BuildStreamedSceneAssetBundle(levels, path, BuildTarget.WebPlayer)) I couldn't find how ! Can Anyone help me?

Comment
Add comment · Show 2
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 vbbartlett · Feb 13, 2013 at 08:24 PM 0
Share

Im not sure what you are asking, what do you mean by "import" the scene? Can you clarify the question?

avatar image CoixdeNono · Feb 13, 2013 at 08:27 PM 0
Share

I mean load it, use it from the assetBundle. Stream it maybe?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by vbbartlett · Feb 13, 2013 at 08:38 PM

Here is where it is described The only difficulty is knowing the name of the level. You would end up downloading the streamed scene and then just call load like the example.

Work flow from me is, collect all the assets in a scene and compare them to another scene and all common assets get selected and then I create an assetbundle from that set of assets.

  BuildPipeline.PushAssetDependencies();
  // Build asset bundle from Common assets
  ..
 
 
  BuildPipeline.PushAssetDependencies();
  BuildPipeline.BuildStreamedSceneAssetBundle(...) //Scene A
  BuildPipeline.PopAssetDependencies();
 
  BuildPipeline.PushAssetDependencies();
  BuildPipeline.BuildStreamedSceneAssetBundle(...) //Scene B
  BuildPipeline.PopAssetDependencies();
 
  BuildPipeline.PopAssetDependencies();
 
 

Each scene will then be the minimum set of assets needed.

When loading you load the commonAsset bundle, then the scene asset bundle.

Comment
Add comment · Show 3 · 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 CoixdeNono · Feb 13, 2013 at 08:50 PM 0
Share

$$anonymous$$y problem is not the building step, it's the loading step. After the build, the upload of the asset, then the downoad o when i have to use the scene from the assetBundle, wich steps do i have to follow ?

avatar image vbbartlett · Feb 13, 2013 at 09:13 PM 0
Share

So after getting the assetbundle from the www cache download, looks like you have to just call an Application.LoadLevel("levelname");

If that doesn't work you might try a getting the bundle and calling load() or even LoadAll in combination with the application.LoadLevel

(Part of our pipeline I am currently working on... :(

avatar image CoixdeNono · Feb 14, 2013 at 09:16 AM 0
Share

I tried that, but it doesnt work as well, the levelname you put in Application.LoadLevel("levelname"); is the name of the level in your asset folder, the one you add on the build Setting before building. So when you call Application.LoadLevel("levelname"); it doesn't load the scene on your AssetBundle, it loads the scene in your asset folder. Dont know if i made myself clear lol ! I give up using this function "`BuildPipeline.BuildStreamedSceneAssetBundle(levels, path, BuildTarget.WebPlayer`", i'll just add an empty scene to the project, and fill it at runtime ,with objects that i load from an assetBundle of objects.

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

10 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

Related Questions

editor load android scene assetbundle error 1 Answer

Editor crashes attempting to load a scene from an assetbundle Unity 5.4.2p3 1 Answer

Is there a scene count limit for asset bundles? 0 Answers

Problem in loading Scene from Asset Bundle... 4 Answers

Not download/load from cache for second time 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