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.
The smaller image refers to Unity’s runtime console output:
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