title: Trying to integrate Agora IO with Unity WebGL. Error when building demo scene
body: <p><strong>Problem description</strong></p>
  
  <p>When building the demo scene in Unity for webgl, and then loading it, the scene loads, but when I click join, I get an error saying 'abort(To use dlopen, you need to use Emscripten's linking support...). <a href="https://i.stack.imgur.com/H7dJH.jpg" rel="nofollow noreferrer">Screenshot of the error.</a></p>
  
  <p><strong>Background information</strong></p>
  
  <p>I've done some googling. Here is someone having the same problem: <a href="https://dev.to/joelthomas362/create-an-agora-group-video-chat-using-unity-33ce" rel="nofollow noreferrer">https://dev.to/joelthomas362/create-an-agora-group-video-chat-using-unity-33ce</a> (scroll down to the comments). </p>
  
  <p>I think it has something to do with the way the agora DLL's are linked (see this thread for example: <a href="https://forum.unity.com/threads/to-use-dlopen-you-need-to-use-emscriptens-linking-support.521968/" rel="nofollow noreferrer">https://forum.unity.com/threads/to-use-dlopen-you-need-to-use-emscriptens-linking-support.521968/</a>) where a unity Dev posts: <em>Dynamic linking, i.e. @DllImport statements, are not supported by WebAssembly (in a form that would be useful to Unity WebGL plugin builds at least). When compiling plugins, the plugins should be authored to link statically to the project instead.</em> However, I can't find how to statically link Agora IO.</p>
  
  <p><strong>Question</strong></p>
  
  <p>Is it possible to get Agora IO to work with Unity WebGL, and if so, how?</p>
  
  <p><strong>How to reproduce</strong></p>
  
  <ul>
  <li>Download Agora video SDK for unity (2.9.2)</li>
  <li>Import SDK into unity</li>
  <li>Enter AppID in GameController object from the demo.</li>
  <li>Go to 'build settings'. Add SceneHome and ScenHelloVideo from the demo to 'Scenes in build'. Click 'WebGl'. Click 'Switch platform', then build (might take a while). </li>
  <li>Upload the output files to a server (WebGl builds in Unity don't open locally in Chrome).</li>
  <li>Open the index.html file on the server.</li>
  <li>The scene loads. Click 'join'. Now you get an error.</li>
  </ul>