- Home /
Can't add component because class SphereCollider doesn't exist! (WebGL)
I was having an error with a WebGL build where the browser console was outputting the following error:
"Can't add component because class SphereCollider doesn't exist!"
I found this extremely confusing cause all I was trying to do was access the SphereCollider component on a freshly generated primitive. This issue was only occurring on the live WebGL, not in the editor.
Solution: It took me two days to discover that one or more files in my ftp upload was corrupted and my ftp software was not overwriting the previous files when uploading a build. The game would still run (mostly) but would have reality-bending nonsensical bugs like this one in the output.
P.S. I wrote this in order to answer my own question as documentation for the next person who suffers this issue.
Answer by JustinReinhart · Jul 24, 2016 at 07:02 AM
Solution: Ftp software was not overwriting one or more of the previous files when uploading a WebGL build. Make double-sure the old files are getting overwritten.
Your answer
Follow this Question
Related Questions
Unity WebGL Build: Why it shows only Empty Folder? 0 Answers
Why cant I play my webGL game in Unity connect ? 0 Answers
Webgl build disables mouse wheel scroll on webpage. 4 Answers
Dynamically created Tilemap tiles render in editor and Android build but not in WebGL build 1 Answer
Are there any major consequences when using Playerprefs? 0 Answers