Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 /
  • Help Room /
avatar image
0
Question by vila4480 · Sep 09, 2021 at 10:15 AM · webglbug-perhapsbuild and runbrowsersupport

WebGL Build uses old script, can't update to a newer version!

Hi everyone,

As the title says, I'm trying to export my project to WebGL, but the scripts the build loads are an outdated version. The project runs fine on the editor, but whenever I build and run my project, it loads the previous script instead of the updated version. In the Inspector, the script is fine - so that rules out a few solutions that I also tried just in case.

I searched online for several hours, tried everything to fix this and I can't figure out what's causing it or how to fix it. Any ideas?

Things I've tried:

-Restarting unity, computer, moving to a new house (kidding... well, not really...) -Cleaning the browser's cache, cookies, app content etc. -Setting Edit->Preferences->General->Auto Refresh to ON -Directory Scanning -Resetting the GameObject that holds the script -Removing the script's meta file to let it regenerate (the meta file was old) -Creating a copy of the project and running it from the copied version -Disabling anti-virus, setting files and folders to admin+write access -Deleting the build and temp folders from the project -Tried different browsers... -Removed/added the scene to the build menu

Here's how I know it's loading the old script. -I copied most of the code from another section of the project that used fonts. However, once I noticed the Debug.Log was mistakenly mentioning "Selected Font" instead of "Selected Background Option", I corrected it. There are also other visual issues with the build version related to the old script.

Please refer to the images I'm uploading: on the larger image, the left part is the Javascript debugger on the browser, the right section is Unity's editor inspector.

Again, this runs well at runtime in the editor (play button), but it loads the old script when built. alt text The smaller image refers to Unity's runtime console output: alt text

The windows standalone export seems to run correctly, although I'm not able to access the console to be 100% sure. This only seems to affect the WebGL build.

I'm lost. Please help! :( Thank you! -ViLa

screenshot-2021-09-08-171223.png (8.9 kB)
screenshot-2021-09-08-172004.png (5.3 kB)
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 God0fMagic · Nov 17, 2021 at 09:12 AM

I have the same issue. It was updating fine for a while and then suddenly stopped updating. I checked that it is the wrong version by simply having a debug on start that I changed between builds. On editor works fine, in the build it debugs the old message.

It first started happening with Asset Bundles. Webgl build has a link to asset bundles in the server. I updated them, but in the build still the old version was being loaded. I even deleted asset bundles from the server so that link inside the build points at an empty directory - and it still loaded old asset bundles.

What helped was changing the directory where asset bundles are hosted and rebuilding the game.

A few builds later game stopped updating as well as asset bundles and now the only option is to change the directory of both game and asset bundles each time I want to update something.

Would be great to know if there are any solutions to this problem. Using Unity 2021.1.17f1

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 vila4480 · Nov 19, 2021 at 05:18 PM 0
Share

Hi @God0fMagic, unfortunately, I had a bunch of issues going on at the time I made this post, so I can't remember what ultimately fixed it, but one thing that messed up my builds pretty bad was updating visual studio to the latest version. I've downgraded to VS Community 2017 (v15.9.39), and things seem to be running much more smoothly. From what I understood there was some sort of bug with running scripts in WebGL builds. Since a couple of weeks ago, I keep getting a warning asking to update VS, but I'm not touching it until it breaks again.

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

173 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 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

webgl app is not working in browser 0 Answers

WebGL & denying browser script access to game methods? 0 Answers

open PDF on WebGL 0 Answers

WebGL: RuntimeError: memory access out of bounds. 6 Answers

Possible Solution: Unity.IL2CPP.Building.BuilderFailedException 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