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 oliver-jones · Jul 02, 2014 at 08:59 AM · assetbundleassetwwwbuildpipelinebundle

Understanding AssetBundles (WWW) BuildPipeline

I'm trying to get my head around Unity's AssetBundle class, which allows me to export assets, and then download and import them over the web.

The issue I'm having is that my Unity project is for iOS, so every time I run the 'BuildAssetBundle' example found here: http://docs.unity3d.com/ScriptReference/BuildPipeline.BuildAssetBundle.html

It changes my build platform from iOS, to Web Player and then exports out successfully. When I change my build platform back to iOS and play within the editor, it successfully downloads the asset bundle from my FTP (WWW), but when I try it on my iPhone, it crashes. Here is the log:

The file can not be loaded because it was created for another build target that is not compatible with this platform. Please make sure to build asset bundles using the build target platform that it is used by. File's Build target is: 6

Do you think it has something to do with the fact its changing the build platform from iOS to Webplayer? And then me having to change it back?

Thanks.

----- UPDATE -----

I found that if I put 'BuildTarget.iPhone' within the 'ExportAssetBundle' example script - it keeps my built platform to iOS. Still works within the Editor, but same error on my iPhone, same log. (And yes, I have uploaded the new bundle to my FTP).

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 PAEvenson · Jul 02, 2014 at 11:52 AM 0
Share

I am not sure how IOS builds cache the asset bundles but you may want to look into cleaning the cache here : http://docs.unity3d.com/ScriptReference/Caching.CleanCache.html

I tend to forget to clean the cache and end up not downloading the new assetbundle with LoadFromCacheOrDownload.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by ajketan · Jul 02, 2014 at 01:00 PM

Here is a very useful editor script that I got from Sergey Taraban ..... I did not find the link to the actual file so uploading one for you.

Please find it here: AssetBundleExporter

This allows you to choose your platform for creating asset bundle and also you can manage the split size of your asset bundle... this proved very helpful to me.

Hope it does the same for you.

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 oliver-jones · Jul 02, 2014 at 01:05 PM 0
Share

Thanks, although you haven't supplied a link to your upload :/

avatar image ajketan · Jul 02, 2014 at 02:58 PM 0
Share

Sorry $$anonymous$$y Bad....Click Here for the link....

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

23 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

C# IEnumerator Function Inheritance Dilemma 1 Answer

Why does building bundles cause unload unused assets to be called? 1 Answer

Can asset bundled scenes contain original tags which can be read when downloaded? 1 Answer

Assetbundle materials? 1 Answer

Getting "The unity3d file is not a valid asset bundle" error 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