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 oxrock · Aug 04, 2017 at 09:53 AM · unity 5webglassetbundle

WebGL build crashes but game runs fine in editor and windows build.

firefox console log

firefox javascript log

The game runs fine in the editor as well as when built for windows. When I build for webGL I get those errors and the game stops functioning. I'm 99% sure that the webGL build simply won't open my asset bundle for some reason. The asset bundles are built for webgl (I have another set for windows) and I've verified countless times that the file path is absolutely correct (verified by the fact that the paths work perfectly fine in windows build). It doesn't matter if I strip engine code or not. The only way I can get the game to function is with full exception handling. That's just keeping it from crashing though, the assets in my asset bundle never actually appear in game. This problem has been plaguing me for months now. If someone could help me solve this, that'd just be wonderful.

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 oxrock · Aug 08, 2017 at 11:50 AM 0
Share

I hope that bumping after several days isn't frowned upon. This is still an active problem without any solution and I'd still appreciate a hand.

avatar image tanoshimi · Aug 08, 2017 at 12:44 PM 0
Share

(I'm not a WebGL expert, but I'll have a stab) Your log suggests that you're trying to load a bundle at file:///C:/Users/oxrock/Desktop/QU_webgl/Strea$$anonymous$$gAssets/webgl_spritesbundle. I assume that's the strea$$anonymous$$g assets directory of the project in which you're working? (i.e. we're talking about an assetbundle shipped with the project, rather than a patch). I'm somewhat surprised that WebGL is trying to use the file:// protocol as I would have thought this would have been sandboxed by the browser - what exactly is the path you're providing to WWW.LoadFromCacheOrDownload() ? Also, I vaguely remember that method is case-sensitive, so make sure your bundle is exactly called that.

avatar image oxrock tanoshimi · Aug 08, 2017 at 03:02 PM 0
Share

this is my bundle loading function:

 void loadSprites()
     {
         string filePath = Application.strea$$anonymous$$gAssetsPath + "/webgl_spritesbundle";
         sprites = AssetBundle.LoadFromFile(filePath);
     }


And you're correct, the bundle is not meant to be downloaded after. It's simply part of the project.

0 Replies

· Add your reply
  • Sort: 

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

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

Related Questions

MovieTexture is not supported when building for WebGL 0 Answers

Unity 5 Resources.LoadAsync on Android slower than iOS? 0 Answers

UI image rendering on some devices but not others 0 Answers

Using CachedXMLHttpRequest 1 Answer

How to disable debug plugins in release build ? 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