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 fherbst · Oct 13, 2011 at 07:45 PM · assetbundleloadrawbytebytes

Loading Asset Bundle from raw bytes

Hello all,

Is there a way to load an asset bundle from raw bytes? In the documentation, it seems that the only way to load one is by using the www class. (One usecase for this would be to send a bundle over the network to someone else.)

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 Bunny83 · Oct 13, 2011 at 08:45 PM 0
Share

Very good question. I see a lot of cases where you would need something like that, but i guess it's not possible since the only way (that i know) is to load it via WWW.

There would be a trick that might work for standalone builds by simulating a web-server and use www to load it from itself :D. But in Web-build that's impossible since you can't act as a server (except with Unitys Networking but you can't simulate a web server with it).

avatar image fherbst · Oct 13, 2011 at 11:27 PM 0
Share

Hm, okay... so that would mean the only way is to somehow save the binary data and then access it via WWW (may it be a temporary file on disk, first sending it to a php script and getting an url, or something else).

avatar image Bunny83 · Oct 14, 2011 at 05:45 PM 0
Share

Usually assetbundles are ment to be loaded from a webserver or from disk (in standalone builds). If you build for the webplayer it's easier for each client to load the bundles from your server. I guess you don't want to setup some kind of cloud-network between the clients... xD.

In standalone build you also need a source where the bundle comes from. Either from a webserver as some kind of "update" or from disk as a user-extention / mod.

Where does your bundles come from?

1 Reply

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

Answer by superpig · Oct 16, 2011 at 12:29 AM

Use AssetBundle.CreateFromMemory().

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 fherbst · Oct 16, 2011 at 09:18 AM 0
Share

Yay! Thank you.

avatar image Bunny83 · Oct 16, 2011 at 03:17 PM 0
Share

+1 ... how did i miss that :D

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How to import the object from server to unity 2 Answers

Converting Vector3 to Byte[]? 4 Answers

AssetBundle Load 0 Answers

AssetBundle - How to load older version unity asset bundle in latest version asset bundle 0 Answers

problems getting text string from assetbundle 1 Answer


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