Runs perfectly in editor and starts browser. Fails probably when an http request is made
You’re trying to use threading in a WebGL app. System.Threading isn’t supported because there is no threading support in JavaScript.
@Moana Actually, you may be using something that uses threading.
I did encounter this problem; for me it was because of System.Xml.Serialization.XmlSerializer.
As you can see in the class file, it handles a given threshold over which the generation is done in background.
The easiest way to fix this was to give the related environment variable a higher value than the default one (“50”), or no threshold at all :
System.Environment.SetEnvironmentVariable("MONO_XMLSERIALIZER_THS", "no");
Of course, the issue can come from some other class entirely, that is also using System.Threading.ThreadPool.QueueUserWorkItem.