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
0
Question by oxymoron · May 25, 2011 at 03:34 PM · assetbundlestreamingdynamic loadingunloadingstreamed scene

Object parent Asset Bundle

Is there a way to know from which asset bundle object was instantiated? Assume I've got web player project with world divided in scenes that are stored in bundles via BuildOptions.BuildAdditionalStreamedScenes. I load the scenes with WWW class and load them additive. Scenes are loaded when player approaches their world location. After scene loads the bundle is not needed anymore and I unload it along with corresponding WWW, _assetBundle.Unload(false) leaves already instantiated assets intact. Yet later I want to delete those instantiated objects. I can mark those objects somehow, maybe tagging them or adding component with scene index, but it would be nicer if I could know from which bundle objects came from. Is there a way to do so? Or maybe I should use some other approach?

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by msknapp · Sep 23, 2011 at 11:58 PM

If I were you then I would write an "AssetBundleManager" class that takes a singleton strategy for managing classes that wrap each asset bundle. The class that wraps each asset bundle can keep a reference to objects instantiated, status of the bundle, etc.

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 oxymoron · Oct 06, 2011 at 10:59 PM 0
Share

How can the wrapper know what objects are instantiated from bundle? If there were individual assets instantiated I know how it could be achieved, but how to track instantiated assets, that are instantiated while LoadLevelAdditive? The only solution I can think of is to get all gameobjects before and after loading and see what wasn't there before, but it seems to me like some kind of dirty walkaround.

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

2 People are following this question.

avatar image avatar image

Related Questions

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

Streaming scenes in assetbundles 1 Answer

AssetBundle content 0 Answers

Loading scripts dynamically in AoT compilers 1 Answer

How to create a scrollable 2D vertical map with dynamically loaded pieces? 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